RE: [PHP] php and texfield values

2004-02-17 Thread Angelo Zanetti

I also tried this to get the result from resultset:

echo(mysql_result($result2, 0, p_company));


-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 2:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php and texfield values


Say I want to populate a textfield from a resultset and the resultset's
field has 2 words in it say: mike smith.
when I echo the value out to the texfields value it only displays mike and
not mike smith, I cant understand why.

here is my code:


   tdinput type=text name=company

?  if (!$prospects ==)
{   echo(value= . $row[p_company]); }?

/td

is the space between mike and smith possibly causing it to only recognize
the first word as all that is needed. Should i be running some function on
the returned value or is my code for entering the value of the textfield
simply incorrect??

TIA
Angelo


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] php and texfield values

2004-02-17 Thread Richard Davey
Hello Angelo,

Tuesday, February 17, 2004, 12:52:13 PM, you wrote:

AZ Say I want to populate a textfield from a resultset and the resultset's
AZ field has 2 words in it say: mike smith.
AZ when I echo the value out to the texfields value it only displays mike and
AZ not mike smith, I cant understand why.

I would suggest tidying up the code a little to make life easier for
yourself. You don't have to have it in-line with the HTML:

?php
 if ($prospects !== )
 {
$value = $row['p_company'];
 }
 else
 {
$value = ;
 }
?

tdinput type=text name=company value=?=$value?/td

Also if your database entry has quote marks in it, it will break this.
Here is one (of many) ways to solve it:

$value = htmlspecialchars($row['p_company']);

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] php and texfield values

2004-02-17 Thread Jarratt Ingram
Hello Angelo

Have you tried, 

tdinput type=text name=company value=? echo
$row['p_company'];?/td

You are missing in your example the closing  tag for the value
parameter. 

regards 
Jarratt



On Tue, 2004-02-17 at 12:52, Angelo Zanetti wrote:
 Say I want to populate a textfield from a resultset and the resultset's
 field has 2 words in it say: mike smith.
 when I echo the value out to the texfields value it only displays mike and
 not mike smith, I cant understand why.
 
 here is my code:
 
 
tdinput type=text name=company
 
   ?  if (!$prospects ==)
   {   echo(value= . $row[p_company]); }?
 
 /td
 
 is the space between mike and smith possibly causing it to only recognize
 the first word as all that is needed. Should i be running some function on
 the returned value or is my code for entering the value of the textfield
 simply incorrect??
 
 TIA
 Angelo
 
 
 Disclaimer 
 This e-mail transmission contains confidential information,
 which is the property of the sender.
 The information in this e-mail or attachments thereto is 
 intended for the attention and use only of the addressee. 
 Should you have received this e-mail in error, please delete 
 and destroy it and any attachments thereto immediately. 
 Under no circumstances will the Cape Technikon or the sender 
 of this e-mail be liable to any party for any direct, indirect, 
 special or other consequential damages for any use of this e-mail.
 For the detailed e-mail disclaimer please refer to 
 http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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