The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
PHP-General - Simple Registration
Discuss Simple Registration in the PHP Development forum on Dev Shed. Simple Registration PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 10th, 2013, 12:10 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 5
Time spent in forums: 1 h 4 m 16 sec
Reputation Power: 0
|
|
PHP-General - 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";
}
?>
|

March 10th, 2013, 12:13 PM
|
 |
Contributing User
|
|
Join Date: Nov 2012
Location: Oxford, United Kingdom
Posts: 40

Time spent in forums: 1 Day 2 h 18 m 23 sec
Reputation Power: 1
|
|
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).
|

March 10th, 2013, 12:24 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 5
Time spent in forums: 1 h 4 m 16 sec
Reputation 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 
|

March 10th, 2013, 12:27 PM
|
 |
Contributing User
|
|
Join Date: Nov 2012
Location: Oxford, United Kingdom
Posts: 40

Time spent in forums: 1 Day 2 h 18 m 23 sec
Reputation Power: 1
|
|
|
Okay, well, what's in 'date.php'?
Do you have a live version available?
|

March 10th, 2013, 12:31 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 5
Time spent in forums: 1 h 4 m 16 sec
Reputation Power: 0
|
|
|
it has datepicker i copied the code at jQuery
|

March 10th, 2013, 12:32 PM
|
 |
Contributing User
|
|
Join Date: Nov 2012
Location: Oxford, United Kingdom
Posts: 40

Time spent in forums: 1 Day 2 h 18 m 23 sec
Reputation Power: 1
|
|
|
That's not good enough. Post the code so I can see it, please.
|

March 10th, 2013, 12:34 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 5
Time spent in forums: 1 h 4 m 16 sec
Reputation Power: 0
|
|
Code:
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Datepicker - Display month & 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>
|

March 10th, 2013, 12:38 PM
|
 |
Contributing User
|
|
Join Date: Nov 2012
Location: Oxford, United Kingdom
Posts: 40

Time spent in forums: 1 Day 2 h 18 m 23 sec
Reputation Power: 1
|
|
|
So you're including another HTML doc, in the middle of a form? Think about it. Include it elsewhere.
|

March 10th, 2013, 12:42 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 5
Time spent in forums: 1 h 4 m 16 sec
Reputation Power: 0
|
|
aaa! that is not allowed?? thank you!!
i'll try to include it elsewhere
thanks for the time 
|

March 10th, 2013, 02:15 PM
|
|
|
|
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!
|

March 10th, 2013, 03:04 PM
|
 |
pollyanna
|
|
Join Date: Jul 2012
Location: Germany
|
|
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".
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|