|
Posted by Krustov on 07/03/06 21:46
<comp.lang.php>
<Alec>
<3 Jul 2006 12:48:19 -0700>
<1151956099.286710.125580@p79g2000cwp.googlegroups.com>
> <?php $townref = $_GET['town']; echo $townref; ?>
> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
> <p align="center">
> <p align="center"> <font color="#FF0000">town id</font><input
> type="text" name="town" size="20" value="" />
> <input type="submit" value="GO" />
> </p>
> </form>
> <?php
> $resulttown = @mysql_query ("SELECT townname, townref, towntitlepic
> FROM townid_uks49179 WHERE townref='$townref'");
> while ($row = mysql_fetch_array($resulttown))
> {
> $townname = $row['townname'];
> $townref = $row['townref'];
> $towntitlepic = $row['towntitlepic'];
> }
> ?>
>
Not sure if i understand your question correctly (even though i know it
makes perfect sense to you) and apart from that this probably isnt the
best way to do it anyway .
<?php
$resulttown = @mysql_query ("SELECT townname, townref, towntitlepic
FROM townid_uks49179 WHERE townref='$townref'");
while ($row = mysql_fetch_array($resulttown))
{
$townname = $row['townname'];
$townref = $row['townref'];
$towntitlepic = $row['towntitlepic'];
}
?>
<?php $townref = $_GET['town']; echo $townref; ?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<p align="center">
<p align="center"> <font color="#FF0000">town id</font>
<input type="text" name="town" size="20" value="" />
<?php
if ($townname<>"") {print "<input type=text name=townname size=20 value=
$townname />";}
if ($townref<>"") {print "<input type=text name=townref size=20 value=
$townname />";}
if ($townpic<>"") {print "<input type=text name=townpic size=20 value=
$townpic />";}
?>
<input type="submit" value="GO" />
</p>
</form>
--
Encrypted email address
www.emailuser.co.uk/?name=KRUSTOV
Navigation:
[Reply to this message]
|