Jump to content

chiaki*misu

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chiaki*misu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. so ..it should be: $_SESSION['name']=name; $_SESSION['id']=id; is that right?
  2. and i put a submit button at my first page..is it correct?
  3. hye all im creating a session.. in my first page.. <?php session_start(); $_SESSION['name']; $_SESSION['id']; ?> name and id are my form names.. then the second page.. <?php session_start(); echo "name is : " .$_SESSION['name']; echo "id is : " .$_SESSION['id']; ?> so..what did i miss? and..when do i use ob_start and ob_flush? r they necessary for my session?
  4. 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?
  5. 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?
  6. so what i should do is: <?php session_start(); include("bore.inc"); include("connection.inc"); include("debug.inc"); //i've saved the code given in an .inc file $value = $_POST['rad1']; $sql="INSERT INTO section_c (`C1`) VALUES ('$value') "; mysql_query($sql) or die(mysql_error()); ?> then..where will the debug file notify me the value selected from the $_POST?
  7. hello everyone.. 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 = $_REQUEST[$rad1[0]]; $sql="INSERT INTO section_c (`C1`) VALUES ('$value') "; mysql_query($sql) or die(mysql_error()); ?> 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? Onegai shimasu..
  8. thanks for the reply.. ive tried that..still dont work..or it is about the database?
  9. hello everyone.. 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> </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"); $sql="INSERT INTO section_c (C1) VALUES ($_REQUEST[ $rad1[0] ]); $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? :(Onegai shimasu..
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.