JJinVA Posted August 16, 2013 Share Posted August 16, 2013 (edited) Hello all. I'm very obviously a noob when it comes to php and webdesign, but luckily for your internet browsing tranquility, I have no desire to become a webdesigner! That said, I DO have the desire to play around with some very basic forms and toss the info into a php file. So let me tell you what I'm looking to do and maybe someone can help me. As an example, I want to have an html form that takes my NAME, AGE, and LOCATION. Next I have to get it to a php file. But I don't want it to be the same php file every single time I press submit. So, my thought process is (and please bare with me and try to make sense of what I'm trying to achieve as I'm not a programmer), but I'm thinking that I'll have 3 php files. One of them will greet me with:Hey "NAME", you are "AGE" and you live in "LOCATION".Another greeting will be:Hey "NAME", good to see you again! Are you still "AGE"? And do you still live at "LOCATION"?And the last something like:What are you up to, "NAME"? How's life in "LOCATION"? "AGE" huh, not getting any younger are you?!So, with that said, my initial thought is, I have to create a php file, lets say, random.php, that randomizes which php file those variables will post to. Like for example, the response php files can be named response1.php, response2.php, and response3.php. Where the random.php file tells it to reply with response[random].php so each time I press the submit button, it present a different response. Does that make sense? I'm sorry I'm such a noob but I have some ideas I want to play with that require the random response and I'm afraid that, as a beginner, if I do something wrong, my website will get hacked all over the place. I also want to add reCAPTCHA to the bottom of the form so bots don't blast my servers. (I already have a public/private key from reCAPTCHA)Can anybody help me please? Edited August 16, 2013 by JJinVA Quote Link to comment Share on other sites More sharing options...
.josh Posted August 16, 2013 Share Posted August 16, 2013 1) this isn't a regex question. Thread moved. 2) There are a ton of "basic form" tutorials on the internet. 3) Are you sure you want to have 3 separate .php files that just show a message in a slightly different way? At face value, it sounds like it would be better for you to have a single php script that keeps your messages in an array and then just select a random element of the array. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.