Jump to content

Form submitting


mynameisbob

Recommended Posts

what is the equivelant to php 4s

 

<form method=post action=file.php?action=1234>

<input type=submit value=Clear name=clear>

</form>

 

<?php

 

if($action == 1234)

{

print"hi";

}

?>

and the website would be something like www.xxx.com/file.php?action=1234

 

that wouldnt work in php 5 but it does in php 4.

 

I know in php 5 it would be something using $_POST or $_GET but im not to keen these.

Link to comment
https://forums.phpfreaks.com/topic/156981-form-submitting/
Share on other sites

ok, i mean in php 4 you could use

 

say there was a form at the link www.xxx.com/link.php and it brought you to that same page but with ?action=1234 that said

name: "bob"  as what you typed in and the name was "name"

if ($action == 1234)

{

print"$name";

exit;

}

 

and on the website it would say bob

 

but in php 5 it doesnt work

 

 

Link to comment
https://forums.phpfreaks.com/topic/156981-form-submitting/#findComment-826935
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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