I am currently working on a site that will sell leads I have a script that is ment to send the leads straight to my affiliate However I am having problems with the form Basically when I submit my form I het a 404 error "url not found" The url that shows is mydomain.com/<?php echo $_SERVER['PHP_SELF']?> This relates i assume to the 1st few links of the form which has the code <form action="<?php echo $_SERVER['PHP_SELF']?>" method="POST" class="formStyle" id='leadForm'/> anyone know what the problem is
is this mydomain.com/<?php echo $_SERVER['PHP_SELF']?> literally what shows in the browser address bar? If so, you don't have php on your server...
I am getting mydomain/<?php echo $_SERVER['PHP_SELF']?> is showing up in the url but I have PHP on my server I have other forms on other sites I have also don a PHP test
hmm, Dear if you want to do this job on same page do one thing change that to the following code. <form action="FILE_NAME.php?action=done†method="POST" class="formStyle" id='leadForm'/> OR <form action="?action=done†method="POST" class="formStyle" id='leadForm'/> Top of the form put that code. <?php if($_REQEST[‘action’] == “doneâ€) { // put your all php code here after submitting your from its will work. } ?>
if you have php running on your server, you need to have your form in .php file or any extension that php can handle
Yes, you are right Sir on these pages you need .php extension on which pages you want to add PHP code thanks.
Don't use $_SERVER['PHP_SELF'] as the forms action, as theirs a possible xss vulnerability, always sanitize or validate if your going to use it.