I can see a few bodges:
1). > echo "<form action='delete_entry.php' action='get'>\n";
should be: echo "<form method='get' action='delete_entry.php'>\n";
2). You have two vars named the 'first' but with different values:
> echo "\t <input type='hidden' name='first'
> value='".stripslashes($first)."'>\n";
> echo "\t <input type='hidden' name='first'
> value='".stripslashes($last)."'>\n";
3). Careful what you print in your posts, some may find it offensive:
> echo "<h4 align=center>Something's fucked up with yo script ya
> herd...</h4>";
HTH
Russ
On Mon, 19 Nov 2001 16:59:51 -0800 pjc <[EMAIL PROTECTED]> wrote:
> I just started playing with PHP and MySQL and am building an online
> phonebook for myself.
>
> >From my 'view_all_numbers.php' I have a link that looks something like this:
> <a
> href="delete_entry_confirm.php?first=yourfirstname&last=yourlastname">DELETE
> </a>
>
> Here is the code from delete_entry_confirm.php
> <?
> echo "<h3 align=center>Are you sure you want to delete <br>";
> echo "<i>".$first." ".$last."</i>";
> echo "<br>from the phonebook?</h3>\n\n";
> echo "<form action='delete_entry.php' action='get'>\n";
> echo "\t <input type='hidden' name='first'
> value='".stripslashes($first)."'>\n";
> echo "\t <input type='hidden' name='first'
> value='".stripslashes($last)."'>\n";
> echo "<input type=submit value='Delete This Entry'>";
> echo " <input type=button value='I would rather keep it...'
> onclick='javascript:history.back();'>";
> echo "</form>";
> ?>
> =======================================================
> And here's the code from my delete_entry.php
> <?
> if(!$last || !$first) {
> echo "<h4 align=center>Something's fucked up with yo script ya
> herd...</h4>";
> exit;
> }
>
> $db = @mysql_connect("localhost","login","pass");
>
> if (!$db)
> {
> echo "<b>Database ain't workin dawg!!</b>";
> exit;
> }
>
> mysql_select_db("paultest");
> $query = "delete from phonebook where last='".$last."' and
> first='".$first."'";
> $result = mysql_query($query);
> if($result)
> echo "<h3>".mysql_affected_rows()." record(s) deleted.</h3>";
> ?>
> =======================================================
>
> This link does work though: <a
> href="delete_entry.php?first=yourfirstname&last=yourlastname">YES I WANT TO
> DELETE</a>
>
> The error that I am getting on delete_entry.php is that my variables aren't
> there. Any suggestions folks?
>
> Thank you in advance.
> -p
>
> --
>
> Paul C
> [EMAIL PROTECTED]
> ICQ:68274240
>
> "You can't put a bag over someone's personality."
>
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]