php help
okay, so i'm new to php and setting up my site and i've got this
<input action="bugs.php" method=POST>
….ect. okay, but when i do this and they submit throught the form it goes to that php page. Do i have to change the method so it just submits it to the page and returns that to the current page?
okay….like i have one page that submits data via form to a php script. that php script then does something with it and needs to submit it to another php script. (they need to be in seperate files, so i cant just do it all in one). how would i send it to the other file without making a hyperlink or javascript redirect using url vars to pass the data.
only_samurai wrote: okay, so i'm new to php and setting up my site and i've got this
<input action="bugs.php" method=POST>
….ect. okay, but when i do this and they submit throught the form it goes to that php page. Do i have to change the method so it just submits it to the page and returns that to the current page?
Are you sure you don't mean <form action="bugs.php" method="POST">
if your form is on a php page, use
markup<form name="form1" method="POST" action="<? echo $_SERVER['PHP_SELF']; ?>">
and it will post it to the same page.
You can then have some code with something like:
<?php
if($form_variable1 != NULL){
//Your page content here
} else {
include('loginform.html');
}
?>