chiaki*misu Posted August 14, 2009 Share Posted August 14, 2009 hello everyone.. first of all..i ma newbie(to php) .right now am devloping a system for a company, in order to graduate..hence im hoping,hard fr your help.. i am using php script, n the input data is to be filled in database-sqlyog..i've question,the database is just for storing data right? so i just create tables in sqlyog. as for the server connection, apache and mysql, i use xampp. i code: <form name="noledge" action="sectionc.php" method="post"> <td><input type="radio" name="rad1" value="1"/></td> <td><input type="radio" name="rad1" value="2"/></td> <td><input type="radio" name="rad1" value="3"/></td> <td><input type="radio" name="rad1" value="4"/></td> <td><input type="radio" name="rad1" value="5"/></td> <td><input type="radio" name="rad1" value="6"/></td> <td><input type="radio" name="rad1" value="7"/></td> <td><input type="radio" name="rad1" value="8"/></td> <td><input type="radio" name="rad1" value="9"/></td> <td><input type="radio" name="rad1" value="10"/></td> <input type="submit" name="send" value="send"> </form> then..in sectionc.php <?php session_start(); $user="root"; $host="localhost"; $password="password"; $database="borang"; $link= mysql_connect($host,$user,$password) or die ("unable to connect to server"); $db = mysql_select_db($database,$link) or die ("unable to locate database"); $code=mysql_set_charset($link,'utf8') or die ("unable to set connection coding"); $value = $_POST['rad1']; $sql="INSERT INTO section_c (`C1`) VALUES ('$value') "; $result=mysql_query($sql) or die("unable to execute query"); ?> i suppose that the value of 1 will be set in column C1 in the table section_c, correct? it does not, so..what did i miss here? Quote Link to comment https://forums.phpfreaks.com/topic/170195-it-does-not-submitted-to-database/ Share on other sites More sharing options...
halfman Posted August 14, 2009 Share Posted August 14, 2009 instead of die() user trigger_error(mysql_error(), E_USER_ERROR) and see what error are you getting. it is just the first step then we can work on the rest Quote Link to comment https://forums.phpfreaks.com/topic/170195-it-does-not-submitted-to-database/#findComment-897799 Share on other sites More sharing options...
chiaki*misu Posted August 14, 2009 Author Share Posted August 14, 2009 thanks for the reply.im so grateful where the error notification would be? after i click the submit button right? then it will echo the error occured..isnt it? but nothing appear on the screen. it was white,blank page after submission. why is that myt be? Quote Link to comment https://forums.phpfreaks.com/topic/170195-it-does-not-submitted-to-database/#findComment-897817 Share on other sites More sharing options...
aschk Posted August 14, 2009 Share Posted August 14, 2009 Then you're not getting an error... What is being written to the table? Because I suspect the problem is that you're expecting 10 values and only getting 1. Put this at the bottom of your script. <?php echo $value; ?> Quote Link to comment https://forums.phpfreaks.com/topic/170195-it-does-not-submitted-to-database/#findComment-898105 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.