|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
INSERTING DATA FROM A FORM
I am using mysql and php to design a book review website however I can not get this code to work and have less then 24 hours to sort this code out and the code for the post I will post following this. If any one can help me I would be very greatful.
<?php if ($submit) { // process form $db = mysql_connect("localhost", "root"); mysql_select_db("fantasybooks",$db); $sql = "INSERT INTO review (User_name, Review_number Review_date, Review) VALUES ('$User_name',$Review_number,'$Review_date','$Revi ew')"; $result = mysql_query($sql); echo ?><BR><BR><BR><A href= Selection.php>Options Screen</a><? ?> <? } else{ // display form ?> <form method="post" action="<?php echo $PHP_SELF?>"> User:<input type="Varchar" name="User_name" size = "50"><br> Review_number:<input type="Varchar" name="Review_number" size ="3"><BR> Review_date:<input type="Varchar" name="Review_date" ><br> Review:<input type="Varchar" name="Review" size = "255"><br> <input type="Submit" name="submit" value="Enter information"> </form> <?php } // end if ?> </body> </html> |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > INSERTING DATA FROM A FORM |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|