Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
What's wrong with this code?
Old 07-10-2003, 10:13 AM What's wrong with this code?
Friend_Al_23's Avatar
Novice Talker

Posts: 9
Location: Philippines
Trades: 0
PHP Code:
<?php

$link 
mysql_connect("localhost","root","") or die("Connection Error: ".mysql_error());

mysql_select_db("thecofc_ama",$link) or die ("Database Error:     ".mysql_error());

$result mysql_query('INSERT INTO `sc_nom` (`stud`, `studnum`, `email`, `pres`, `vice`, `sec`, `treas`, `proe`, `proi`, `sgt`, `strep`, `ndrep`, `rdrep`, `datetime`) VALUES (`$stud`, `$studnum`, `$email`, `$pres`, `$vice`, `$sec`, `$treas`, `$proe`, `$proi`, `$sgt`, `$strep`, `$ndrep`, `$rdrep`, NOW())',$link) or die("Query Error: ".mysql_error());

mysql_free_result($result);

mysql_close($link);

?>
You can try it out at http://thecofclub.distanthost.com/AMA/sc_nom.php
__________________
The
Please login or register to view this content. Registration is FREE
Community
Friend_Al_23 is offline
Reply With Quote
View Public Profile Visit Friend_Al_23's homepage!
 
 
Register now for full access!
Old 07-10-2003, 02:43 PM
Omega's Avatar
Extreme Talker

Posts: 234
Location: Sharpsville, PA
Trades: 0
Try this...

instead of:

$result = mysql_query('INSERT INTO `sc_nom` (`stud`, ...etc...

try:

$result = mysql_query('INSERT INTO sc_nom VALUES (`stud`,
__________________
-----------------------------------------------
Current Projects:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
Omega is offline
Reply With Quote
View Public Profile Visit Omega's homepage!
 
Old 07-11-2003, 12:25 PM
Friend_Al_23's Avatar
Novice Talker

Posts: 9
Location: Philippines
Trades: 0
Thanks anyway. Problem already solved.
__________________
The
Please login or register to view this content. Registration is FREE
Community
Friend_Al_23 is offline
Reply With Quote
View Public Profile Visit Friend_Al_23's homepage!
 
Reply     « Reply to What's wrong with this code?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22112 seconds with 12 queries