Jump to content

[ resolved ] form entries


bodyland

Recommended Posts

Hi:

I've made a php form that enters various bits of information into a mysql database. Part of the info I put into this form is included in the URL to the form. ie http://www.mysite.com/archives/bio.php?id=561&name=dick%20tracy  Is there a way - and how do I do it - of using the id# from the URL and entering it into a blank in the form as as as the name - dick tracy - and capitalizing the first letters. Thanks
Link to comment
https://forums.phpfreaks.com/topic/30316-resolved-form-entries/
Share on other sites

I don't know about captilizing the first letters of the two words. But, you can easily snag that name by using the $_GET statement.

$name = $_GET['name'];

This will set that variable value for you from the 'name' segment of the URL coming to the form. Then, when they land on the form page you'd do this in that field:

<input type='text' size='20' name='name' value='$name'>

That will put 'dick tracy' into that spot. If you want caps for those then there may be some string code for it but I'm not aware. Might be easier to pass it with caps in the URL.
Link to comment
https://forums.phpfreaks.com/topic/30316-resolved-form-entries/#findComment-139505
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.