- This topic is empty.
July 19, 2013 at 4:27 pm #46543
I am a bit new to the PHP realm..
That is what i have now in my PHP code, and can’t figure out how to get it to work. And I don’t really understand the PHP code given above.
I saw a post the tried to explain this with this code:
$url = htmlspecialchars($_SERVER);
But I don’t quite understand that, and tried copying and pasting into my code with no success.
Any help is greatly appreciated. Thank you!July 19, 2013 at 5:00 pm #143657chrisburtonParticipant
Why go through all this trouble? Just link to the page the form is on.July 19, 2013 at 6:21 pm #143627
I can’t because the form is a local file. The PHP file is on a server, while the HTML file is in the Widget file locally.July 19, 2013 at 6:42 pm #143630chrisburtonParticipant
May I ask what exactly you’re trying to do? Not your problem but the overall goal.July 19, 2013 at 6:52 pm #143631
I need a way to get back to the local file, or to post the error message without leaving the original form page.
Thank you for all your help.July 19, 2013 at 7:03 pm #143615drewwyattParticipant
I agree with **chrisburton** here – that there may be a cleaner way to accomplish this. However, to directly answer your question – you could use [$_SERVER Variables](http://php.net/manual/en/reserved.variables.server.php “$_SERVER Variables”). Something like this might work:
July 19, 2013 at 7:52 pm #143621AlenParticipant
Why don’t you do some client-side validation before posting data. And use AJAX… quick search resulted in: http://stackoverflow.com/questions/13924309/ajax-form-submission-with-php
- The forum ‘Back End’ is closed to new topics and replies.