how can i get more than 1 variables here ?
Code: Select all
<form action = request.php?username=<?= $_REQUEST['username'];?> email=<?= $_POST['email']?> method="post" >this code giving me error... plz help me out
Moderator: General Moderators
Code: Select all
<form action = request.php?username=<?= $_REQUEST['username'];?> email=<?= $_POST['email']?> method="post" >Code: Select all
<form action=request.php?username=<?= $_REQUEST['username'];?>&email=<?= $_POST['email']?> method="post" >It's not a good idea to do that anyway. Some browsers will drop the query string when trying to send data via GET and POST simultaneously. Search the forums, you should find a thread about it somewhere.Skittlewidth wrote:Why are you sending the data as a query string if the form method is post? Is this intentional?
What I also noticed in your code was <?= "bla"; ?> using the semicolon. That'll give you a parsing error, since in <?=?> tags this gets dropped.<form action="request.php?username=<?= urlencode($_REQUEST['username']) ?>&email=<?= urlencode($_POST['email']) ?>" method="post" >
<!-- Some form stuff in here... -->
</form>