#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    5
    Rep Power
    0

    Unhappy Simple Registration


    hello! i havethis code below,
    when i click the submit nothing happens

    PLEASE HELP ME!


    <form method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
    <font color="red">
    *<input class="design1" size="45" placeholder="First Name" name="fname" type="text" /><br>
    *<input class="design1" size="45" placeholder="Last Name" name="lname" type="text" /><br>
    *<input class="design1" size="45" placeholder="Email" name="email" type="text" /><br>
    *<input class="design1" size="45" placeholder="Re-enter Email" name="REemail" type="text" /><br>
    *<input class="design1" size="45" placeholder="Password" name="pass" type="text" /><br>
    *<input class="design1" size="45" placeholder="Confirm Password" name="COpass" type="text" /><br>

    </font>
    Birthday:<?php include('date.php');?>

    Gender: <input name="gender" type="radio" value="Male" />Male <input name="gender" type="radio" value="Female" />Female

    <input type="submit" value="submit" name="submit">
    </form>

    if(isset($_POST['submit']))
    {
    $_fname=$_POST['fname'];


    if(preg_match('/[a-z]i/', $_fname))
    {
    echo "valid";
    }
    else
    echo "invalid";
    }
    ?>
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    Oxford, United Kingdom
    Posts
    40
    Rep Power
    3
    Not 100% sure about this, but shouldn't
    Code:
    <input type="submit" value="submit" name="submit">
    be
    Code:
    <input type="submit" value="submit" name="submit"/>
    Notice the "/" just before the ">".

    And next time you post some code, could you please wrap it in the [ CODE ]....[/ CODE ] tags (ignore spaces).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    5
    Rep Power
    0
    it just the same...

    can i ask? i have this line
    Birthday:<?php include('date.php');?>

    I've try to remove this and the submit button is now working,, why is that? but i have to include this
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    Oxford, United Kingdom
    Posts
    40
    Rep Power
    3
    Okay, well, what's in 'date.php'?

    Do you have a live version available?
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    5
    Rep Power
    0
    it has datepicker i copied the code at jQuery
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    Oxford, United Kingdom
    Posts
    40
    Rep Power
    3
    That's not good enough. Post the code so I can see it, please.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    5
    Rep Power
    0
    Code:
    <html lang="en">
    <head>
      <meta charset="utf-8" />
      <title>jQuery UI Datepicker - Display month &amp; year menus</title>
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
      <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
      <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
      <link rel="stylesheet" href="/resources/demos/style.css" />
      <script>
      $(function() {
        $( "#datepicker" ).datepicker({
          changeMonth: true,
          changeYear: true
        });
      });
      </script>
    </head>
    <body>
      <form method="post" action="#">
    <input type="text" name="birthdate" id="datepicker" />
         </form>
     
    </body>
    </html>
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    Oxford, United Kingdom
    Posts
    40
    Rep Power
    3
    So you're including another HTML doc, in the middle of a form? Think about it. Include it elsewhere.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    5
    Rep Power
    0
    aaa! that is not allowed?? thank you!!
    i'll try to include it elsewhere
    thanks for the time
  18. #10
  19. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,552
    Rep Power
    2337
    Instead of copying and pasting **** you find, why not make an effort at actually learning HTML and JavaScript?
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!
  20. #11
  21. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Yeah, that might help.

    The HTML is only an example of how to embed and use the plugin, it is not meant to be literally copied or included. I mean, I'm pretty sure you don't want your page to be titled "jQuery UI Datepicker - Display month & year menus".
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo