If statement or something else?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux