Jump to content

MYSQL Deleting Help!


xyn

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.
Link to comment
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!";

}

?>

Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.