0

Can Somebody help me with my PHP project. what I want is to make a database query's result to be randomly distributed to an html table. and then save the whole table in a database just like this.

Query Result
Query Result
Query Result

to

Data Data Query Result
Data Data Query Result
Data Data Query Result

to

DATABASE


I would gladly appreciate your help tnx.

Edited by curious_me: n/a

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Caeon
0

I don't really understand what you are asking. At best you have defined a requirement. This is a programming forum (but it isn't a place to get your project coded for you). You don't have a programming issue yet because you haven't done any. Write the code and then if you have an issue, come back and ask a specific question. If you don't know how to write the php code (and don't care about learning it), then find a utility to do it or go to a site like Odesk and find someone to code it for you.

0

Sorry for the newbie post sir. Actually sir I already have a code. I just dont know how to populate a table with the results of the query then that table to be saved in mysql database these are my codes sir.

$query = $query = "SELECT * FROM pointsprof, subject WHERE pointsprof.Total >= subject.IM206"; 
	 
$result = mysql_query($query) or die(mysql_error());

$row = mysql_fetch_array($result) or die(mysql_error());

do {echo '<form action="subjectload.php" method="POST" name="theForm" onsubmit="return validateFormOnSubmit(this)">
  <table width= "200">
    <tr>
      <td><label>
        <input type="radio" name="RadioGroup1" value="'.$row['name'].'" id= "RadioGroup1_0" />
         '.$row['name'].'</label></td><br/>
    </tr> 
  </table>';} while($row = mysql_fetch_array($result)) ?><input type="submit" name="submitType" value="CONTINUE">
0

I am not entirely sure what you're problem is, but I would do this:

$query = "SELECT * FROM pointsprof, subject WHERE pointsprof.Total >= subject.IM206";
$result = mysql_query($query) or die(mysql_error());

echo '<form action="subjectload.php" method="POST" name="theForm" onsubmit="return validateFormOnSubmit(this)">';

echo '<table width= "200">';

while ($row = mysql_fetch_array($result))
{
  echo '<tr>';
  echo   '<td><input type="radio" name="RadioGroup1" value="'.$row["name"].'" id= "RadioGroup1_0" /></td>';
  echo '</tr>';
}

echo '</table>';
echo '<input type="submit" name="submitType" value="CONTINUE">';

This way everything is in one table and will print out nicely. If you are a little more clear on your problem, maybe I can say a little more.

Hopefully this is helpful! Good luck!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.