Jump to content

If action


Canman2005

Recommended Posts

Hi all

Has anyone ever run into problems using the action query such as

[code]if ($action == "delete" && $id != "")
{[/code]

For some reason the web server I am using doesnt understand what the action is and simply ignores it, executing the first sql statement it can find on the page.

Any ideas would be great.

Thanks

Ed

Link to comment
Share on other sites

[!--quoteo(post=352251:date=Mar 6 2006, 09:52 PM:name=Gaia)--][div class=\'quotetop\']QUOTE(Gaia @ Mar 6 2006, 09:52 PM) [snapback]352251[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Where are you getting the value of $action from?
[/quote]


Via the form, so the form action might look like

<form id="form" method="post" action="page.php?action=delete">
Link to comment
Share on other sites

For this case you would need to use "$_POST['action']"

This has all of the standard problems that indicate that this is a gregister_globals enabled vs. disabled problem.

You should always program your scripts assuming that [a href=\"http://www.php.net/register_globals\" target=\"_blank\"]register_globals[/a] is disabled.

Ken
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.