Re: still learning php
| From: | Miles Thompson | Date: | Mon, 01 Oct 2001 13:00:47 +0000 |
| Subject: | Re: still learning php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69451@lists.php.net to get a copy of this message | ||
You just add more fields:
$sql = "Insert into TABLE values('$name', $surname, $comments);
that's assuming that the order of the data exactly matches the order of the fields in the table.
Take the time to work through a couple of MySQL tutorials(assuming that's what you're using), and have a look at the tutorials Julie Meloni has on her http://www.thickbook.com site.
Miles
At 12:36 PM 10/1/01 +0000, Caleb Carvalho wrote:
Hi Dimitris, thanks, but what if I have 5 fields to add into ie name,surname,comments? Caleb Carvalho Application Engineer LoadRunner/APM ----------------------------------------------------------------------------------------- Enterprise Testing and Performance Management Solutions ----------------------------------------------------------------------------------------- Mercury Interactive 410 Frimley Business Park Frimley, Surrey. GU16 7ST United Kingdom Telephone : +44 (0)1276 808300From: "Dimitris Kossikidis" <dikos@vip.gr> To: "Caleb Carvalho" <havanero@hotmail.com> CC: <php-general@lists.php.net> Subject: Re: [PHP] still learning php Date: Mon, 1 Oct 2001 14:29:14 +0300 $field_value = "I 'm bla bla"; $field_value = addslashes($field_value); $sql = "Insert into TABLE values('$field_value'); ----- Original Message ----- From: "Caleb Carvalho" <havanero@hotmail.com> To: <php-general@lists.php.net> Sent: Monday, October 01, 2001 2:05 PM Subject: [PHP] still learning phpI posted a msg earlier on regarding error when adding text with quotes ' .. I have just found out thar I need to use addslash() function, my q's is where do i put this function? Caleb Carvalho Application Engineer LoadRunner/APM -----------------------------------------------------------------------------------------Enterprise Testing and Performance Management Solutions -----------------------------------------------------------------------------------------Mercury Interactive 410 Frimley Business Park Frimley, Surrey. GU16 7ST United Kingdom Telephone : +44 (0)1276 808300 _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net