ÎÒÔÚ×¢²áÒ³ÃæÐ´ÈëÁËÈçÏ´úÂ룺
<?php
$conn=mysql_connect("localhost","root","614510")or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Ó´íÎó".mysql_error());
mysql_select_db("message",$conn)or die("Êý¾Ý¿â·ÃÎÊ´íÎó".mysql_error());
mysql_query("set names gb2312");
$username=$_POST['username'];
$name=$_POST['name'];
$password=$_POST['password'];
$sex=$_POST['sex'];
$email=$_POST['Email'];
$html=$_POST['html'];
$sql=mysql_query("insert into users(username,name,password,sex,email,html)values('$username','$name','$password','$sex','$email','$html')");
echo " <script>alert('Ìá½»ÐÅÏ¢³É¹¦!');window.location.href='member-register.php'; </script>";
Ïà¹ØÎÊ´ð£º
±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......
×ö¸öÕ¾ÄÚËÑË÷£¬ÏÖÔÚÓÃlike ÕâÑùµÄЧÂÊʵÔÚÌ«µÍÁË£¬Ïë¸Ä³ÉÈ«ÎÄËÑË÷·½Ê½¡£
µ«¿´ÁËÍøÉÏ˵µÄÖÐÎÄÖ§³Ö²»ºÃ£¬ÏëÎÊһϸ÷λÐÖµÜÊÇÈçºÎ½â¾öÕâ¸öÎÊÌâµÄ£¿
µ¥¶À½¨Á¢Ö÷Ìâ±íºÍÄÚÈÝ±í ¼ìË÷Ö÷Ìâ
È»ºó¸ù¾ÝÖ÷Ìâ¼ìË÷Ä ......
ÎÒ°²×°ºÃmysqlºó,ĬÈϵÄÊý¾Ý¿â·¾¶ÊÇÔÚCÅÌÏÂ,ÎÒÏë°ÑËü¸Äµ½EÅÌÀï: ÎÒÏȰÑmysql·þÎñÍ£Ö¹,ÔÙÔÚmysql°²×°Ä¿Â¼(Ò²ÊÇÔÚEÅÌ)ÏÂÕÒµ½my.iniÎļþ,¾Í¸ÄÁËÏÂÃæÄÇô¶à:
#Path to the database root
datadir="E ......
ÔÚMySQL5.0Öд¬½¢´æ´¢¹ý³Ìͨ²»¹ý£¬Ìáʾ£º
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' ......
´ó¼ÒºÃ£¬ÎÒÔÚ´´½¨Ë÷Òýʱ£¬³öÏÖ´íÎóÌáʾ£¬´úÂëÈçÏ£º
create uique index stu_cou_index on student_info.results (student_id, course_id);
show index from student_info.results;
±£´æÎªindex.s ......