I want to use array of fetched ...
like this >> $grow=mysql_fetch_row($gresult);
from a sql table in a php function by html link...
<html>
<body>
<?php
$gquery="SELECT * FROM Goods WHERE grooh=$hrow[0]";
$gresult=mysql_query($gquery);
$gnum=mysql_num_rows($gresult);
$grow=mysql_fetch_row($gresult);
echo "<a href='?addaray'><img src =./Images/minicast.jpg width=30></a>";
?>
</body>
<?php
if (isset($_GET['addaray']))
{
echo"<script>window.alert(",$grow[2],")</script>";
}
?>
The $grow[2]
in function is equal zero every time.
Please help me.
Aucun commentaire:
Enregistrer un commentaire