Jump to content

How to Echo and Insert at the same time


xxreenaxx1

Recommended Posts

I am echo information from the database now I would like to insert these to different table. I am using checkbox to echo and when the user click on the one of these the result should be saved to a new table.

 

So far I have

<?php
include 'Database/connection.php';

include 'Database/question_sql.php';

while($info = mysql_fetch_array( $sql ))
{
echo "{$info['Que_Question']} <br />\n";
echo "<input type=\"checkbox\" name=\"choice1[]\" value=\"{$info['Que_Choice1']}\" /> ";
echo "{$info['Que_Choice1']} <br />\n";
echo "<input type=\"checkbox\" name=\"choice2[]\" value=\"{$info['Que_Choice2']}\" /> ";
echo "{$info['Que_Choice2']} <br />\n";
echo "<input type=\"checkbox\" name=\"choice3[]\" value=\"{$info['Que_Choice3']}\" /> ";
echo "{$info['Que_Choice3']} <br />\n";
echo "<input type=\"checkbox\" name=\"choice4[]\" value=\"{$info['Que_Choice4']}\" /> ";
echo "{$info['Que_Choice4']} <br />\n";


}


?>

Link to comment
https://forums.phpfreaks.com/topic/227607-how-to-echo-and-insert-at-the-same-time/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.