ok i will try to reword the question for you jason.. and i will also now that i have a little bit of time post come code too..
i have a form that takes 17 input text fields and 1 textarea field and gives them to a file called addtolist.php. the addtolist.php file has some error checking (of course) and a mysql_query that will insert those 18 variables into a table. now, i added a section of code to that addtolist.php file that checks to see if a record owned by $company already exists. if not just insert the new record.. if so then stop and ask the user what he wants to do with the existing record: modify it (a button) or cancle (a button). if the user hits the modify button then the file addtolist.php will give all 18 variables from the form to the file called editlist.php where an update query does the work. the problem is that all the variables transfer fine as far as im aware of except the last one in the query_string. how would i get the %20 out of the last variable (which happens to be company name). here is my code: //button code <input type="button" name="modify" value="Modify this record" onclick="window.location='editlist.php?company=$company&name1=$name1&name2=$ name2& address1=$address1&address2=$address2&city=$city&state=$state &zip=$zip&ac1=$ac1&ext1=$ext1&num1=$num1 &ac2=$ac2&ext2=$ext2&num2=$num2&website=$website &email=$email&description=$description&flags=$flags &edit_company=$_get[company] ';" onkeypress="window.location='editlist.php?company=$company&name1=$name1&name 2=$name2 &address1=$address1&address2=$address2&city=$city&state=$state&zip=$zip&ac1= $ac1&ext1=$ext1&num1=$num1 &ac2=$ac2&ext2=$ext2&num2=$num2&website=$website&email=$email&description=$d escription &flags=$flags&edit_company=$_get[company] '"> //end the button. (sweat that was a lot of code) anyways... the query in editlist.php that is supposed to make this button work: //update query that gets the vars from modify button in addtolist.php <?php include("conf.inc"); mysql_connect($host, $mysqluser, $mysqlpwd); mysql_select_db($db); if($query=mysql_query("update members SET Company=\"$company\", Name1='$name1', Name2='$name2', Address1='$address1', Address2='$address2', City='$city', State='$state', Zip='$zip', AreaCode1='$ac1', Exchange1='$ext1', Number1='$num1', AreaCode2='$ac2', Exchange2='$ext2', Number2='$num2', Description='$description', Flags='$flags', Website='$website', Email='$email' where company='$edit_company' or '$company'")){ //rest of code here ?> hope this helps clear things up... ----- Original Message ----- From: "Jason Paschal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 8:57 PM Subject: Re: [PHP] query strings > i think i misinterpreted ur question. > the value gets passed like that due to url encoding, but when you access > that query string variable, it won't be there. > try using the POST method with your form instead if you still have problems. > there are also some PHP functions like encode and unencode i think. > search the php site for them. > > > >From: "Sunfire" <[EMAIL PROTECTED]> > >To: "Jason Paschal" <[EMAIL PROTECTED]> > >Subject: Re: [PHP] query strings > >Date: Mon, 3 Mar 2003 18:32:32 -0500 > > > >how would you use post? the stuff is going from a form to the database but > >a query checks to make sure that record doesnt already exist first...if it > >does i window comes up with 2 buttons.. a modify button (if you push it its > >supposed to update the record) and a cancel button (goes back to main menu) > >if i cant do that how would you use session vars? > > > > > >----- Original Message ----- > >From: "Jason Paschal" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Monday, March 03, 2003 3:36 PM > >Subject: Re: [PHP] query strings > > > > > > > I think there's a limit on the length of a url or query string, > >something > > > like 255 or 256 characters. If I'm passing a lot of data, or I don't > >know > > > how much a user is gonna input but it's possible they can enter a lot, > >then > > > i use POST instead of Get. If a form is not involved, then try saving > >it > >to > > > a database and retrieving it, or using session variables. > > > Hope this helps! > > > Jason > > > > > > > > > > > > > > > > > > > > > >From: "Sunfire" <[EMAIL PROTECTED]> > > > >To: <[EMAIL PROTECTED]> > > > >Subject: [PHP] query strings > > > >Date: Mon, 3 Mar 2003 15:20:02 -0500 > > > > > > > >i have a might i say a very very large/long query string i have to run > >to > > > >pass variable values from one page to another with a button... the > >button > > > >works and the query string are passing variables right but at the end > >of > > > >the > > > >query string (it passes like 21 variable values) the last variable > >content > > > >that gets passed gets messed up.. i mean if i have like this: > > > >page.php?.........&edit_company=$company > > > >so lets say company has the value of "hi world" in it.. the value is > > > >supposed to be passed with "hi world" but for some reason i keep > >getting > > > >"hi%20world" instead of "hi world" > > > > > > > >any reason for that.. if you need i can post my query string and button > > > >code > > > > > > > > > > > > > > > > > > > >--- > > > >Outgoing mail is certified Virus Free. > > > >Checked by AVG anti-virus system (http://www.grisoft.com). > > > >Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > > > > > > > > > > > >-- > > > >PHP General Mailing List (http://www.php.net/) > > > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > _________________________________________________________________ > > > Add photos to your messages with MSN 8. Get 2 months FREE*. > > > http://join.msn.com/?page=features/featuredemail > > > > > > > > > > > >--- > >Outgoing mail is certified Virus Free. > >Checked by AVG anti-virus system (http://www.grisoft.com). > >Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > > > > > _________________________________________________________________ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php