Go Back   SitePoint Forums > Forum Index > Program Your Site > PHP
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old Jul 10, 2003, 08:05   #1
QReyes
PHP Programmer
 
QReyes's Avatar
 
Join Date: Oct 2001
Location: Philippines
Posts: 702
Question What's wrong with this code?

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
QReyes is offline   Reply With Quote
 

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
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
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 01:01.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved