Jump to content

Action failure.


Carlton
 Share

Recommended Posts

echo("
	<form method = \"get\" action = \"DeleteApp.php?pname=\" . $Applications['Name'] . \">
	<input value='Delete' type='submit' />
	</form>
");

 

Why is this redirecting to: DeleteApp.php?. Instead of what you can obviously see what it's supposed to redirect to.

 

Link to comment
Share on other sites

I can "obviously see" it posting to "DeleteApp.php" what was you expecting ?

 

also

you probably meant why is the pname not being set!

 

try this (with extra quotes)

echo("
<form method = \"get\" action = \"DeleteApp.php?pname=\"" . $Applications['Name'] . "\">
<input value='Delete' type='submit' />
</form>
");

Link to comment
Share on other sites

I can "obviously see" it posting to "DeleteApp.php" what was you expecting ?

 

also

you probably meant why is the pname not being set!

 

try this (with extra quotes)

echo("
<form method = \"get\" action = \"DeleteApp.php?pname=\"" . $Applications['Name'] . "\">
<input value='Delete' type='submit' />
</form>
");

 

No I didn't mean, that pname is a empty string (In the URL of course).

 

The page just goes to http://localhost/DeleteApp.php?

 

Nothing after .php?

Link to comment
Share on other sites

YEP!

using get and not passing anything from the form will give a clear url!

 

if you used POST the you could pass both!

IE

echo("
<form method = \"POST\" action = \"DeleteApp.php?pname=\"" . $Applications['Name'] . "\">
<input value='Delete' type='submit' />
</form>
");

 

BUT Pikachu2000 is the better route IMHO

Link to comment
Share on other sites

That isn't the way to send a GET var . . .

 

<?php
echo "<form method=\"get\" action=\"DeleteApp.php\">
<input type=\"hidden\" name=\"pname\" value=\"{$Applications['Name']}\" />
<input value='Delete' type='submit' />
</form>
";
?>

 

Thank you.

Link to comment
Share on other sites

This thread is more than a year old.

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.

 Share

×
×
  • 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.