Jump to content

ksweety2012

New Members
  • Posts

    3
  • Joined

  • Last visited

ksweety2012's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you soooo much...... Record updated in mysql db, but eno is saved as 0 instead of 18 (which i enered actual eno.). my form.html page code is like this: html> <body> A small example page to insert some data in to the MySQL database using PHP <form action="DBINSERT.php" method="post"> Eno<input type="number" name="eno" /><br><br> Ename: <input type="text" name="ename" /><br><br> <input type="submit" /> </form> </body> </html> Please look into the code where i used input type="number" name='eno" and I passed eno as 18. but database took as 0, regards,
  2. <?PHP $user_name = "ganga"; $password = "gangamma"; $database = "ganga"; $server = "localhost"; $conn = mysql_connect($server, $user_name, $password); print "Connection to the Server is now opened"; $sql = 'INSERT INTO `ganga`(`eno`, `ename`) VALUES ('$_POST[eno]','$_POST[ename]')'; mysql_select_db('ganga',$conn); $retval = mysql_query( $sql, $conn ); echo "Entered data successfully\n"; mysql_close($conn); ?> Getting php error: Parse error: syntax error, unexpected '$_POST' (T_VARIABLE) in C:\xampp\htdocs\DBINSERT.php on line 11 help this please...gangadhara
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.