sorry...this is the error i get:

Warning: Supplied argument is not a valid MySQL result resource in
/www/prunet/agent_result.php3 on line 110


-----Original Message-----
From: Glyndower [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 18, 2001 1:55 AM
To: Matt Wagner; Craig Westerman
Cc: MySQL-List
Subject: parameters?


I'm a newbie to MySql / Php and heres what i'm trying to accomplish:

I have a set of hard coded links that each have a sql parameter value like
below:

<a href="http://www.foo.com/agent_result.php3?$agent_id=9805";>My Link
Text</a>

I'm trying to pass that parameter into a query on another page and have it
display the results based on the variable.


<?php $db = mysql_connect("localhost", "user","password");
mysql_select_db("db_name");
$result = mysql_query("SELECT * FROM agentdb WHERE '$agent_id' = agent_id");
php?>

Then the data gets displayed:

<img src="http://www.foo.com/agentpics/<?php
printf(mysql_result($result,0,"first_name")); ?>_<?php
printf(mysql_result($result,0,"last_name")); ?>.jpg" width="89" height="92"
vspace="5" hspace="5">

I'm still thinking in an access box, i'm sure...can somebody give me a push
in the right direction?

TIA, Chris



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to