Jump to content


Photo

i don know what is wrong with this code pliz some1 help


  • Please log in to reply
4 replies to this topic

#1 wawenka

wawenka
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 26 October 2006 - 11:59 AM

<html>
<body>
// Set Mysql Variables
<?php
$host = 'localhost';
$user = 'root';
$pass = '';
$db = 'KenetInventory';
$table = 'Equipment';

// Set global variables to easier names
$ItemNo = $_POST['ItemNo'];
$Manufacturer = $_POST['Manufacturer'];
$Model = $_POST['Model'];
$SerialNO = $_POST['SerialNo'];
$Description = $_POST['Description'];
mysql_connect($host,$user,$pass) or die(mysql_error());
mysql_select_db(KenetInventory) or die(mysql_error());
$add_all = 'INSERT INTO Equipment values('$ItemNo','$Manufacturer','$Model','$SerialNo','$Description',''');
mysql_query($add_all) or die(mysql_error());
}
?>
</body>
</html>

#2 jvrothjr

jvrothjr
  • Members
  • PipPipPip
  • Advanced Member
  • 300 posts
  • LocationOhio

Posted 26 October 2006 - 12:14 PM

$add_all = 'INSERT INTO Equipment values('$ItemNo','$Manufacturer','$Model','$SerialNo','$Description','')';

If you understand everything you know nothing!

http://rcchjr.awardspace.com/

#3 wawenka

wawenka
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 27 October 2006 - 08:17 AM

i don get it could you expound abit?? on what i should do with line 19

#4 jvrothjr

jvrothjr
  • Members
  • PipPipPip
  • Advanced Member
  • 300 posts
  • LocationOhio

Posted 27 October 2006 - 02:58 PM

'$Description','')';

look at your structure at the end of the line
If you understand everything you know nothing!

http://rcchjr.awardspace.com/

#5 wawenka

wawenka
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 30 October 2006 - 08:45 AM

thanx i got it this tym.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users