Forum Moderators: coopster

Message Too Old, No Replies

How to echo/insert a specific result?

         

manu11

7:48 pm on Feb 12, 2004 (gmt 0)



Hi, I don't know PHP..i use dreamweaver and now i realise it is far from enough.
This code selects from a previous page where the users entered some votes and select the 7 products they vote the most.
I want to be able to make them vote again but with the same products for a different question.
If i could echo each of the results from the query, i could insert each of the votes to a new table in the DB (MySql).

Here's the code...

<? session_start();
$session_id = session_id();
?>
<?php require_once('Connections/mariz.php');?>
<?php
mysql_select_db($database_mariz, $mariz);
$result = mysql_db_query("mariz","SELECT * FROM table1 WHERE session_id =
'$session_id' ORDER BY votos1 DESC limit 7");
while($row = mysql_fetch_array($result)) {
echo $row["marcas"];
echo $row["votos1"];
}
mysql_free_result($result);
?>

---------------

Thanks,

Manuel

jatar_k

11:57 pm on Feb 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld manu11,

Maybe you could take a look at using $_SESSION [ca2.php.net] and storing the products there so you have them all the way through.