|
Help with PHP Form?
|
|
09-18-2008, 01:40 AM
Post: #1
|
|||
|
|||
|
Help with PHP Form?
So, I was wondering if anyone knew any answer on how to do this.
I am a PHP newbie, so go easy on me ![]() Either way, I wanted to create a form so that when a user visits the URL http://example.com/form.php?variable=X then, a form field assigned to the variable will be assigned the value 'X'. PayPal uses this. I think it is like, HTTP requests, IDK. Please help
Need web hosting? Try MyBBWebHost! #1 for Running MyBB Communities ------- Biodegradable Sunscreen - Unblock Facebook |
|||
|
09-18-2008, 12:42 PM
Post: #2
|
|||
|
|||
|
RE: Help with PHP Form?
Something like an action?
With the get method? "I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - J.D Salinger |
|||
|
09-23-2008, 09:07 PM
(This post was last modified: 09-23-2008 09:07 PM by pepotiger.)
Post: #3
|
|||
|
|||
|
RE: Help with PHP Form?
try this
PHP Code: if(isset($_GET['variable'])Official Arabic Translator. |
|||
|
09-23-2008, 10:41 PM
Post: #4
|
|||
|
|||
|
RE: Help with PHP Form?
If you want some resources for learning php then check out this thread: http://community.mybboard.net/thread-37709.html
But as pepotiger said the main thing you will need is the $_GET['whatever'] function which gets values from the url get data (what you want). The isset bit is just checking that the variable actually exists so that it doesn't spit any errors later in the program if it is not assigned. Need help? Have you seen this? |
|||
|
09-23-2008, 11:55 PM
Post: #5
|
|||
|
|||
RE: Help with PHP Form?
(09-23-2008 09:07 PM)pepotiger Wrote: try this Should be urldecode since you're getting a value from the URL. Also you need to use htmlspecialchars before outputting it into the HTML form. http://php.net/urldecode http://php.net/htmlspecialchars Dennis Tsang :: MyBB Developer Follow me on Twitter: @dennistt |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help






