[PHP] quotes

2003-06-25 Thread Lso .
Ok I have been searching to no avail.   I have a form that lets you add new 
sets of information to a database.  Once you add information i have a page 
that displays this information in a series of text fields.  I have done this 
so you can alter the information in the fields hit edit and the information 
is updated, you are brought back to the same page and there you see your 
updated information.  This all works fine.  The problem is if the usere 
enters a quote.  I have used addslashes(), and the information is entered 
fine, but when I display the information in the form fields its cut off 
right after the  quote.  I tried stripslashes() didnt work.  If i url encode 
the input i get the html entity displayed in the form field.  Does anyone 
have any suggestions?  Im just trying to make a nice interface for editing 
this data.  Thanks in advance.

Lucas Owens
www.lucasowens.com
www.technoiraudio.com
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
Yes!! You are the man!  It works!  Thank you all for the fast response.

Lucas Owens
www.lucasowens.com
www.technoiraudio.com

Try a textarea. Example:
_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
Does anyone know why this works this way?  seems kinda odd that a textarea 
will display it correctly but a normla field will not.

Try a textarea. Example:
Lucas

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
understood.  thanks for the help.

Lucas Owens
www.lucasowens.com
www.technoiraudio.com



From: Adam Voigt <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "Lso ." <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] quotes
Date: 25 Jun 2003 10:47:56 -0400
Cause of the quotes around the value, example:



The HTML parser gets confused by the "'s around hank,
so since the textarea doesn't use quote's to delimit the
value, it works fine.


On Wed, 2003-06-25 at 10:37, Lso . wrote:
> Does anyone know why this works this way?  seems kinda odd that a 
textarea
> will display it correctly but a normla field will not.
>
> >>Try a textarea. Example:
>
> Lucas
>
> _
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
--
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group

_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
Thanks everyone.  Honestly I tried so many things that Im not sure exactly 
what combinations I tried.  The textfield trick works, and I so sick of 
looking at this script Im moving on.  Ill try something else the next time 
around.  Thanks again for all of the excellent fast help!!

Lucas Owens
www.lucasowens.com
www.technoiraudio.com
_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
it doesnt work,  i just tried it. the text is still cut off after the quote


Just try htmlentities()!  A textarea is for multiple lines of text!

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
go ahead an try it.  the quote is quite clearly in the database, but when i 
try to put it back in a form field everything is cut off after the quote. 
and i tried stripslashed, and htmlentities, and htmlspecialchars.  i would 
turn magic quotes on, but im afaid it might mess something else up.  there 
is too much stuff running on this serever to take that risk.

Lucas Owens
www.lucasowens.com
www.technoiraudio.com



From: Jason Wong <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] quotes
Date: Thu, 26 Jun 2003 00:58:40 +0800
On Thursday 26 June 2003 00:02, Chris Sherwood wrote:
> well thats seems unlikely as I do it all the time..
>
> how ever I am not going to argue p's and q's ...
> if it doesnt work for him it doesnt work
>
> - Original Message -
> From: "Adam Voigt" <[EMAIL PROTECTED]>
> To: "Chris Sherwood" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 25, 2003 9:04 AM
> Subject: Re: [PHP] quotes
>
> > Umm, in his first email, he specifically said all the quotes
> > were already escaped with slashes and it didn't help.
> >
> > On Wed, 2003-06-25 at 11:50, Chris Sherwood wrote:
> > > or you would escape the quote by putting a \ in front of it that way
> > > the engine knows to "write" the quote.
> > >
> > > ie input type=\"text\"
HTML doesn't need (indeed, want) slashes in front of quotes.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
here ya go:


function dbconnect(){
$dbh=mysql_connect ("**", "**", "**") or die ('I cannot connect 
to the database because: ' . mysql_error());
mysql_select_db ("**");
}

$dbname = "***";
$urlname = "parteditlists.php";
function drawtable2($id, $company, $division, $contact, $address1, $city, 
$state, $zip, $voice, $fax, $email, $dbname, $urlname){
echo "



  
  
 company
 division
 contact
 address
 city


 editdelete
  {$company}
  {$division}
  {$contact}
  {$address1}
  {$city}


  
 state
 zip
 voice
 fax
 email


  {$state}
  {$zip}
  {$voice}
  {$fax}
  {$email}


";
}

?>


New York One Call - Participating Members Administration Page




New York One CallParticipating Members List Add 
Form.



 
  Company Name:
  
 
 
  Company Division:
  
 
 
  Contact Name:
  
 
 
  Address:
  
 
 
  City:
  
 
 
  State:
  
 
 
  Zip:
  
 
 
  Voice Number:
  
 
 
  Fax Number:
  
 
 
  Email:
  
 
 
   
  
 



http://www.nycli1calldsi.com/lists/partmemtest.php"; 
target="_blank">Display the Participating Members page.

New York One CallParticipating Members List Edit 
Form.

 

 dbconnect();

 $query = "SELECT * FROM {$dbname} ORDER BY company";
 $result = mysql_query( $query )
  or die ( "MySQL Error - " . mysql_errno() . ": " . mysql_error() );
 $numresult = mysql_num_rows($result);
 for($i=0; $i<$numresult; $i++){
  $row = mysql_fetch_array($result);
  drawtable2($row['id'], $row['company'], $row['division'], 
$row['contact'], $row['address1'], $row['city'], $row['state'], $row['zip'], 
$row['voice'], $row['fax'], $row['email'], $dbname, $urlname);
 }

?>



_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes

2003-06-25 Thread Lso .
im stupid.  it works.  so sorry.  htmlentities did the trick.  i had a chunk 
of code lingering from a former attempt at fixing it that screwed it all up. 
 thanks again everyone.

Lucas

_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] quotes

2003-06-25 Thread Lso .
ok i see why i didnt work but i dont know why.

can anyone tell me why this works:

  

but this doesn't:

echo "";

Lucas Owens
www.lucasowens.com
www.technoiraudio.com
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] quotes again finally got it right

2003-06-25 Thread Lso .
ok thanks for putting up with me.  it works just fine if i use \" instead of 
single quotes in the html that the php is generating.  thanks again.  i 
think i finaly got it.

Lucas Owens
www.lucasowens.com
www.technoiraudio.com
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php