submit in html on sql query
Posted
by
user1644661
on Stack Overflow
See other posts from Stack Overflow
or by user1644661
Published on 2012-09-03T21:36:17Z
Indexed on
2012/09/03
21:37 UTC
Read the original article
Hit count: 136
i need to run this sql query , which give me a list of Id and Dates i want to click each result and take with me the Id value to the next form i wrote this query above but i see in the debager that the hidden ID get his value but not pass to the next form i think i have a problem with the submit() . where should i put him ?
thanks anat
function ShowAllCarts($user_email) {
$connB = new ProductDAO();
$connB->Connect();
$pro_query = "SELECT * FROM Cart WHERE `Email`='$user_email';";
$db_result = $connB->ExecSQL($pro_query);
$html_result = '<div data-role="content"> <ul data-role="listview" data-theme="b"> ';
$html_result .= '<form action="PreviouscartProduct.php" method="POST"/>';
while($row_array = $db_result->fetch_array(MYSQLI_ASSOC))
{
$Id= $row_array['Id'];
$Date= $row_array['Date'];
//$html_result //
$html_result .="<li><a href='PreviouscartProduct.php'>Cart number: $Id from Date: $Date><input type='hidden' name='Id' value'<?=$Id?>'</input></a></li>'";
$html_result .= '<a onclick="this.form.submit();" </a>;
}
$html_result .= ' </ul> </div>';
$html_result .= '</form>';
$connB->Disconnect();
return $html_result;
}
//display all carts $func_result = ShowAllCarts($Email);
© Stack Overflow or respective owner