开发者

a php form question [closed]

开发者 https://www.devze.com 2023-03-11 06:32 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_开发技巧 Closed 11 years ago.

i have this question: creating 2 pages in php the first(index.php) contain a form for inputing first_name and last_name and when you submit the form the url must be like this: http://127.0.0.1:8888/index1.php?boxaction=confirm this for confirming the form(2nd page) now we have still submit and this one for display the form with this url: http://127.0.0.1:8888/index1.php?boxaction=display


sounds like you want to validate input from the form field and you want the form to post back to itself. set your action in your form to point to itself. check the $_POST values for valid responses and then echo the content of those $_POST values to the page. when you first load the page it will need to know not try and echo those $_POST values as you have not submitted the form yet

as for what you are trying to accomplish with ?boxaction=var ... i'm confused.

in a perfect world you would validate this/any form client side using JavaScript and then again using a server side tool - like PHP. the JavaScript enhances user experience but the server side validation (hopefully) prevents script kiddies from wreaking havoc

0

精彩评论

暂无评论...
验证码 换一张
取 消