Zdraveite!
Izviniavam se che pak podhvanah tema, no imam problem koito me machi ot izvestno vreme.
Sigorno e neshto elementarno, no az ne moga da se spravia
Pri napisvane na daden klientski nomer vav formata, iskam ot bazata danni da se pokazva samo negovata informazia a ne dannite na vsichki klientski nomera ot zialata tabliza. Ne znam kak da stane v php?
Eto kakvo pisha v stranizata s formata:
$colname_Recordset1 = "-1";
if (isset($_GET['ClientID'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['ClientID'] : addslashes($_GET['ClientID']);
}
mysql_select_db($database_proba, $proba);
$query_Recordset1 = sprintf("SELECT * FROM report WHERE ClientID = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $proba) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
<form id="form1" name="form1" method="post" action="nachalo.php">
<input value="<?php echo $row_Recordset1['ClientID']; ?>" type="text" name="textfield" />
<input type="submit" name="Submit" value="Submit" />
</form>
<?php
mysql_free_result($Recordset1);
?>
I kakvo v stranizata sas saobshtenieto:
$colname_Recordset1 = "-1";
if (isset($_GET['ClientID'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['ClientID'] : addslashes($_GET['ClientID']);
}
mysql_select_db($database_proba, $proba);
$query_Recordset1 = sprintf("SELECT * FROM reportpokasi WHERE ClientID = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $proba) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>ClientID</td>
<td>total</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['ClientID']; ?></td>
<td><?php echo $row_Recordset1['total']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<?php
mysql_free_result($Recordset1);
?>
Predvaritelno blagodaria!
Usmihnat den!