Simple question :)
Moderator: General Moderators
Simple question :)
How can I remove a mysql row from php ?
exemple, remove row where ID='5'.
thx
Flamie
exemple, remove row where ID='5'.
thx
Flamie
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
thx a lot guys, you're a lot of help 
Now I'm just having a blank, I TOTALLY forgot how to use a variable from another page, let's say their's a form on page1.php that sends the data to page2.php, and let's say on page1 we entered the variable 'ID', how can I use it on page2 ?
Wasnt it $HTTP_POST or something ?
Now I'm just having a blank, I TOTALLY forgot how to use a variable from another page, let's say their's a form on page1.php that sends the data to page2.php, and let's say on page1 we entered the variable 'ID', how can I use it on page2 ?
Wasnt it $HTTP_POST or something ?
well, the most common way to use http post is to send it through the url..
so, you would have a link on page1.php that looks like this :
page1.php
then, you can call it like so from page2.php
page2.php
if ur gonna be passing the variable through a form, use $_POST in page 2...
if there is just a variable that has been declared, just include page 1..
so, you would have a link on page1.php that looks like this :
page1.php
Code: Select all
<?php
echo '<a href="page2.php?id='.$id.'">Page 2 Link</a>';
?>page2.php
Code: Select all
$id = $HTTP_GET_VARS['id'];
echo $id;if there is just a variable that has been declared, just include page 1..
Code: Select all
include('page1.php');
echo $id;
Last edited by infolock on Thu Mar 04, 2004 1:11 pm, edited 2 times in total.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
If you're accessing variables from the query string as the page1.php example seems to show, then you need to use $_GET['id'] not $HTTP_POST_VARS['id'] which would be the same as $_POST['id'].infolock wrote: page2.phpCode: Select all
$id = $HTTP_POST_VARS['id']; echo $id;
Mac
Re: Simple question :)
Check out this site.Flamie wrote:How can I remove a mysql row from php ?
exemple, remove row where ID='5'.
thx
Flamie