[NEED HELP] PHP Form post, get, echo - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21) +---- Thread: [NEED HELP] PHP Form post, get, echo (/showthread.php?tid=23986) |
[NEED HELP] PHP Form post, get, echo - Đενɨаηсε™ - 12-20-2011 Hey guys. I ran into some trouble with some PHP and I need some help. If anyone is experienced with this, please add my contact info because I need help ASAP. AIM: kthfhdf1901 Skype: kthfhdf1901 If you can help me I'd even be willing to pay a little. I basically need to capture the data from four text fields and echo it into a URL. From my understanding it can easily be done by someone who knows PHP. Thanks! RE: [NEED HELP] PHP Form post, get, echo - ★Cooldude★ - 12-22-2011 PHP Code: <?PHP RE: [NEED HELP] PHP Form post, get, echo - Haxalot - 02-05-2012 (12-22-2011, 07:00 AM)★Cooldude★ Wrote: If you would like to modify the URL on form submit, you must use the GET method in your forms. However you must always ensure you apply sanitisation upon said $_GET['']; variables to prevent SQL injections on your website. Here is an example on how to build a custom URL using the GET method from a form: PHP Code: <?php get.php?phone_number=(number_here)&action=submit A very basic, yet secure URL that is not susceptible to SQL injection attacks because i have made sure that if the phone number being entered is not numerical, the page will output an error only. This is done by using the function intval upon the phone number entered in the form, and if the function returns false, a NULL value is given to $phone_number causing the next IF statement to return FALSE. RE: [NEED HELP] PHP Form post, get, echo - ★Cooldude★ - 02-05-2012 ^Why not use integer typecasting? RE: [NEED HELP] PHP Form post, get, echo - Haxalot - 02-06-2012 Type casting will give the exact same result. Its just the way i like to do things. PHP Code: $id = intval($_GET['id']); RE: [NEED HELP] PHP Form post, get, echo - ★Cooldude★ - 02-06-2012 ^There's less typing required for typecasting, but okay. |