Jump to content

Archived

This topic is now archived and is closed to further replies.

xyn

MYSQL Deleting Help!

Recommended Posts

Hi guys.

I am basically wondering how i can do something with $_GET['blob']; var. Because I wanted to be able to use this:

page.php?del=[color=red]post[/color]&id=[color=red]ID[/color].
But I don't know how to do it, Also When i try using more than one $_GET the code wont work.

Share this post


Link to post
Share on other sites
play with the example i am providing to understand ok.



test.php the link ok.
<?php

echo"<a href='test_result.php?&cmd=delete'>try me</a>";

?>

test_result.php
<?php


if($_GET['cmd']==delete){

echo "delete database entry";

}else{

echo "no not there ok!";

}

?>

Share this post


Link to post
Share on other sites
What are you using? I form using the GET method, or a link?



1) If it's a form, the form should look like this:
<form action="action.php" method="GET">
<input type="text" name="field1">
<input type="text" name="something">
<input type="submit">

And the "action.php" will recieve the vars: $_GET['field1'] and $_GET['something']



2) If it's a link, the like should look like:
<a href="action.php?field1=value&something=somethingelse" ....>
And the "action.php" will recieve the vars: $_GET['field1'] and $_GET['something']



Orio.

Share this post


Link to post
Share on other sites
I got it working eventually! Lol. thx =]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.