Closed Thread Icon

Topic awaiting preservation: persistant variables ? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12068" title="Pages that link to Topic awaiting preservation: persistant variables ? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: persistant variables ? <span class="small">(Page 1 of 1)</span>\

 
Air
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Nov 2001

posted posted 02-26-2002 13:34

Hi again again

ok my array problem is solved, though now I have a brand new one..

case:
page no#1 has a password field named "pass"
page no#2 includes either page3 or page4 depending on the password field value..

this is what I need to do:
I need to send the $pass value to one of the include files
so that I can use it for the -> mysql_query(.... were password=$pass)

how do I do that ?
(thanks 4 all u're help btw) =)

Air
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Nov 2001

posted posted 02-26-2002 13:53

^.... correcting

I seem to have an error with the mysql_query NOT with the $pass..

shouldnt this work ?

**copy&paste>>
$query = 'select a1, a2, a3, a4 from table where a4=$pass';
$result = mysql_query($query);
$i = 0;
while($row=mysql_fetch_array($result)) {
<<***copy&paste

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 02-26-2002 14:01

That select statement looks okay.

What kind of error are you getting?

-Butcher-

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 02-26-2002 14:03

no, if you want php to parse a variable in a string, you have to put double quotes (") around it.
Ex
$hello = 'hello world';
print ('$hello'); -> prints $hello
print ("$hello"); -> prints hello world.

clear?
so long,

Tyberius Prime

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 02-26-2002 14:15

Sorry my bad for not catching the single quotes!

-Butcher-

« BackwardsOnwards »

Show Forum Drop Down Menu