[PHP] mail(); and embedding pictures

2003-09-26 Thread Iggy
I am wondering if it is possible to embed pictures into email messages using
this function.
Thanx

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



[PHP] connecting to mysql db

2003-03-25 Thread Iggy
hi,
I am trying to play and learn php along with mysql and I have a question
about connecting to a db.
Is the following code necessary on every php page where I am retrieving some
data from a db or is there any way to connect once (something like
index.php) and have that connection open through subsequent pages?
the code
?php
$link = mysql_connect(localhost, , )
or die(Could not connect:  . mysql_error());
print (Connected successfully);

mysql_select_db(test)
or die(Could not select database:  . mysql_error());
?

thanx
iggy



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



Re: [PHP] connecting to mysql db

2003-03-25 Thread Iggy
This really doesn't explain me much. I mean the difference between having
that code on every page or calling it from an external page doesn't tell me
if it is realy necessary to do it all the time. I guess I am looking for
more generic explanation of the whole process rather than what you said.

However I appreciate it much, since it seems to be much better coding
practice

Iggy



Randy Rankin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Place the code in a file ( ie; dbcon.php ) and include that file in any
page
 which may need it using an include statement: include(dbcon.php);

 Randy

 -Original Message-
 From: Iggy [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 25, 2003 7:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] connecting to mysql db


 hi,
 I am trying to play and learn php along with mysql and I have a question
 about connecting to a db.
 Is the following code necessary on every php page where I am retrieving
some
 data from a db or is there any way to connect once (something like
 index.php) and have that connection open through subsequent pages?
 the code
 ?php
 $link = mysql_connect(localhost, , )
 or die(Could not connect:  . mysql_error());
 print (Connected successfully);

 mysql_select_db(test)
 or die(Could not select database:  . mysql_error());
 ?

 thanx
 iggy



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




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



[PHP] session id

2003-03-25 Thread Iggy
can somebody tell me why I am getting this:
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line 21

Warning: session_start() [function.session-start]: Cannot send session cache
limiter - headers already sent (output started at
c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line 21


when I use this code:

session_start();
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
}


PHP is version 4.3.1

thanx



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



[PHP] php and forms

2003-03-24 Thread Iggy
hi,
I am very new to php so please forgive me if this is somewhat of a dumb
question
I have a html page with a whole bunch of textfields and checkboxes.
Once the user fills out the information it is entered it is recorded in a
mySQL db/table
the problem that i am having is with the checkboxes. if they are checked
everything works fine, but if they are not then I get this:

Notice: Undefined index: foo

how do I make this notice disappear?



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