Forum Moderators: coopster

Message Too Old, No Replies

Deleting records from results

arrrggghhh

         

mcjohnson

9:55 am on Feb 25, 2005 (gmt 0)

10+ Year Member



all,

I have a simple script that returns a list of a specific member's records in a DB, as below:

// now you can display the results returned
while ($row= mysql_fetch_array($result)) {
$title = $row['mfg'];
$product = $row['product'];
$condition = $row['condition'];
$model = $row['model'];
$price = $row['price'];
$member = $row['member'];
$comments = $row['comments'];

echo "</p><b>$count.&nbsp;$title&nbsp;$product&nbsp;</b><br>
<font size=2>Condition:&nbsp $condition&nbsp;&nbsp&nbsp&nbsp&nbsp
Model Number: $nbsp$model&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp;
Price:&nbsp$$price&nbsp&nbsp&nbsp&nbsp&nbsp;
Contact:&nbsp$member&nbsp&nbsp&nbsp Comments:&nbsp;$comments</font><br>" ;

to this, I wish to add the option of deleting the individual record from the list that is returned.

I suspect that I need to use a form/post to send the returned row to a delete.php scripted page - but am having difficulty figuring out how to gather the information from the returned row and send it to a new page.

Or would this no be a form at all? would it work better to define the entire returned result as a single variable and somehow add the delete option directly within the page without sending it to a new form?

As you can see, I am a newbie but learning. I am crawling. It's getting easier, but every new tweak the client wants sends me into a tizzy of learning something new. Any help you can provide woul dbe great, and if you need add'l information please let me know.

Best Regards,.

Pat

mcjohnson

10:43 pm on Feb 25, 2005 (gmt 0)

10+ Year Member



never mind. I figured it out. One thing I have learned above all else is that PHP/MySQl can do darn near anything. The other thing I have learned is that sometimes, the hardest tasks magically validate the first or second time around, and the simplest tasks sometimes take you all day and three hundred varients before it works.

But it's almost like a drug fix, esp. when you are a newbie. You close your eyes, click the page and hwne it works, that adreneline rush is better than the first sip of scotch.

jatar_k

10:53 pm on Feb 25, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> the simplest tasks sometimes take you all day and three hundred varients before it works

lol, I feel that pain, as we all do, all too often ;)