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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.