If statement or something else?
| From: | JeRRy | Date: | Wed, 31 Mar 2004 10:10:27 +0000 |
| Subject: | If statement or something else? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33713@lists.php.net to get a copy of this message | ||
Hi,
Okay here is a sniplet of some code...
<snip>
<?php
mysql_connect ("localhost", "tassie_jerry",
"s2390lpTAS225");
mysql_select_db ("tassie_tipping");
$qr = mysql_query("SELECT IF ( misc = ( 'y' ) , '<Form
Action=tipupdate.php
METHOD=POST
enctype=multipart/form-data>', '<Form Action=tip1.php
METHOD=POST
enctype=multipart/form-data>' ) FROM round2 where
username = \"$sidarray[0]\"");
$result = mysql_query($qr);
$row = mysql_fetch_array($qr);
echo $row['0'];
?>
</snip>
Okay what I am trying to do is this, if a person has
tipped misc = y if not it's blank. Now if y I want to
divert the form to a new page, and if blank it goes to
another page. (different from the other)
The code above fails. If y is the value it shows the
correct form address but if it's blank it does not
have the form HTML code. :( Why? Anyone got any
ideas?
Or is there another way of doing this?
J
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com