|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
help a lost person
here goes.....i am having problems with php and mySQL.....
i have a form......and i have my verify form.....now the problem is when i fill out the form and submits my verification page comes up but when i check my database there is no record of entry.....any ideas...i even did a cut and paste from one of the tutorials here and still no luck......(but if i go through the web base control panel i can add records to database)....is in desperate need of some tips....thank you |
|
#2
|
|||
|
|||
|
RE: help a lost person
well i think in order for us to help us you should post your code here
cheers chief |
|
#3
|
|||
|
|||
|
RE: help a lost person
<HTML>
<BODY> <form method="post" action="datain.php"> First name:<input type="Text" name="first"><br> Last name:<input type="Text" name="last"><br> Nick Name:<input type="Text" name="nickname"><br> E-mail:<input type="Text" name="email"><br> Salary:<input type="Text" name="salary"><br> <input type="Submit" name="submit" value="Enter information"> </form> </HTML> THATS MY FORM PAGE <HTML> <?php $db = mysql_connect("localhost", "username","password"); mysql_select_db("learndb",$db); //for new PHP $first=$_POST[first]; $last=$_POST[last]; $nickname=$_POST[nickname]; $email=$_POST[email]; $salary=$_POST[salary]; // $sql = "INSERT INTO personnel (firstname, lastname, nick, email, salary) VALUES ('$first','$last','$nickname','$email','$salary')"; $result = mysql_query($sql); echo "Thank you! Information entered.n"; ?> </HTML> verification page |
|
#4
|
|||||
|
|||||
|
RE: help a lost person
I can't see anything wrong there (that dosn't mean its right)
To get a more detailed error, add this code: php Code:
If theres something wrong with your SQL... it should give you some idea where to look |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > help a lost person |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|