php-general Digest 23 Feb 2001 15:03:46 -0000 Issue 529

Topics (messages 41252 through 41317):

more info:  Re: [PHP] file uploads problem?
        41252 by: Ed Lazor

passing variables in javascript
        41253 by: Nicholas W. Miller
        41254 by: Simon Garner
        41278 by: Nicholas W. Miller
        41279 by: Simon Garner

Re: Adding new data at beginning.
        41255 by: David Robley

Re: -----s--- bit
        41256 by: Yasuo Ohgaki

Re: Obtaining a value from dynamic list box
        41257 by: David Robley

<select name=....
        41258 by: Peter Houchin
        41261 by: David Robley
        41262 by: Jonathan Sharp
        41263 by: Simon Garner

Re: Counter Help
        41259 by: Navid Yar
        41260 by: Simon Garner
        41274 by: Navid Yar
        41275 by: Boaz Yahav
        41287 by: Navid Yar
        41297 by: Boaz Yahav

mail prob
        41264 by: W.D.
        41265 by: Simon Garner
        41266 by: W.D.
        41267 by: Simon Garner
        41268 by: David Robley
        41269 by: W.D.
        41270 by: Simon Garner
        41271 by: W.D.
        41272 by: Simon Garner
        41273 by: David Robley
        41276 by: Simon Garner

is there a way to set apache's auth_user from php?
        41277 by: Bob Mroczka

How to pass variables on php command line ?
        41280 by: Leonard Schneider
        41281 by: Simon Garner
        41294 by: Simon Garner
        41298 by: Leonard Schneider

php_self
        41282 by: Brandon Feldhahn

Global variables - please explain me someone.
        41283 by: Dezider Góra
        41300 by: Christian Reiniger

PHP 4.0.4pl1 RPM download ?
        41284 by: Oguz Demirkapi
        41288 by: Mathias Meyer

Error compiling php
        41285 by: Enrico Comini

Fwd
        41286 by: Taylor Silvers

apache+php on MacOSX
        41289 by: Thierry Coopman
        41305 by: Andrew Hill

Re: Location
        41290 by: Joe Njeru

Re: [PHP-NOTES] note 11519 added to virtual
        41291 by: Jesus M. Castagnetto

$submit  does not work! strange !!!!!!!!
        41292 by: kaab kaoutar
        41296 by: Adrian Murphy

PHP / Filemaker?
        41293 by: knaSen

Cobalt RaQ4r (RedHat 6.x) & Php 4 Update
        41295 by: Oguz Demirkapi

File content type
        41299 by: Matt
        41304 by: Jason Stechschulte

newbie question
        41301 by: knaSen
        41302 by: Jon Haworth

mysql.sock
        41303 by: andreas \(.work\)

File command
        41306 by: Liam Gibbs

Problemas con conexion Oracle
        41307 by: Alex sepúlveda
        41316 by: Martin A. Marques

Parsing a string
        41308 by: Todd Cary
        41310 by: Hardy Merrill
        41311 by: Jon Haworth
        41317 by: Martin A. Marques

trouble getting .php3 files to work in php4.0.4pl1 (static)
        41309 by: Hunter Kelly
        41312 by: Hoover, Josh

Problem with $REMOTE_ADDR
        41313 by: Rosen
        41314 by: Kurth Bemis

Re: [PHP-INST] trouble getting .php3 files to work in php4.0.4pl1 (static)
        41315 by: Geordon VanTassle

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


I was curious, so I uploaded a file using the upload form and transferred 
the same file via ftp and did a diff on the two files.  Here's the results:

diff -a Poster.jpg Poster_test.jpg
0a1,2
 > Content-Type: image/pjpeg
 >

Does that help?

-Ed

At 06:01 PM 2/22/2001 -0800, Ed Lazor wrote:
>More info:
>
>I transferred an image to the web server via ftp and was able to view it 
>successfully from the web site.
>
>Here's an example image that was transferred using a file upload form that 
>won't display properly:
>
>http://www.atfantasy.com/attachments/3224/samurai1.jpg
>
>When you try to view it, it just displays a box with a small x, as if the 
>image wasn't there.  I've verified the image is there.
>
>What would be doing this?
>
>-Ed
>
>
>At 05:30 PM 2/22/2001 -0800, Ed Lazor wrote:
>>File uploads -was- working.  I reinstalled the server with the RedHat 
>>packages
>>
>>         apache-1.3.14-3.rpm
>>         php-4.0.4pl1-3.rpm
>>         php-mysql-4.0.4pl1-3
>>
>>I'm using the same scripts, but file uploads is not working 
>>now.  Correction... the file uploads to the server, but doesn't view 
>>properly when I try to load it in a browser.  If I grab it by ftp from 
>>the server and view it in Photoshop, it looks fine.
>>
>>Any ideas?
>>
>>-Ed
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





I have a text link that is coded to open a PHP file in a popup window:

<a 
href="#"onClick="MM_openBrWindow('../email/popup.php?title=B2B+Antitrust:+Opening+Moves+in+the+Game&url=http://www.domain.com/biz/pubs.html#antitrust','email','width=410,height=435')">Emailthis
 
article</a>

For some reason the $url variables cuts off the anchor, so I only get this:

$url = http://www.dttgfsi.com/ebiz/pubs_eviews.html

I have tried escaping it (\#antitrust), but the doesn't work.

Any suggestions would be appreciated ...

Nick




From: "Nicholas W. Miller" <[EMAIL PROTECTED]>

> I have a text link that is coded to open a PHP file in a popup window:
>
> <a
>
href="#"onClick="MM_openBrWindow('../email/popup.php?title=B2B+Antitrust:+Op
ening+Moves+in+the+Game&url=http://www.domain.com/biz/pubs.html#antitrust','
email','width=410,height=435')">Emailthis
> article</a>
>
> For some reason the $url variables cuts off the anchor, so I only get
this:
>
> $url = http://www.dttgfsi.com/ebiz/pubs_eviews.html
>
> I have tried escaping it (\#antitrust), but the doesn't work.
>
> Any suggestions would be appreciated ...
>
> Nick
>


You have to encode each part of the query string on the URL correctly:

<a href="#" onClick="MM_openBrWindow('../email/popup.php?<?php
    echo "title=" . urlencode("B2B Antitrust: Opening Moves in the Game")
        . "&url=" .
urlencode("http://www.domain.com/biz/pubs.html#antitrust");
?>', 'email','width=410,height=435')">Emailthis</a>


Cheers

Simon Garner





>  Hmmmm ... is there anyway to do this without requiring the page 
>with the link to use PHP?
>
>>
>>You have to encode each part of the query string on the URL correctly:
>>
>><a href="#" onClick="MM_openBrWindow('../email/popup.php?<?php
>>     echo "title=" . urlencode("B2B Antitrust: Opening Moves in the Game")
>>         . "&url=" .
>>urlencode("http://www.domain.com/biz/pubs.html#antitrust");
>>?>', 'email','width=410,height=435')">Emailthis</a>
>>
>>
>>Cheers
>>
>>Simon Garner





From: "Nicholas W. Miller" <[EMAIL PROTECTED]>

> >  Hmmmm ... is there anyway to do this without requiring the page
> >with the link to use PHP?
> >


Well if the string you're going to urlencode() is always going to be the
same, then just run it through once, grab the encoded version and hard-code
it :)




> >>
> >>You have to encode each part of the query string on the URL correctly:
> >>
> >><a href="#" onClick="MM_openBrWindow('../email/popup.php?<?php
> >>     echo "title=" . urlencode("B2B Antitrust: Opening Moves in the
Game")
> >>         . "&url=" .
> >>urlencode("http://www.domain.com/biz/pubs.html#antitrust");
> >>?>', 'email','width=410,height=435')">Emailthis</a>
> >>
> >>






On Fri, 23 Feb 2001 08:34, Jan Grafström wrote:
> Hi!
> I am trying to put in a new data at the beginning of a file.
> I have started like this;
>
> --------
>
> $yourfile = "test.xml";  (<a><b><c><d><e><f></c> this is the file.)
> $fp = fopen ($yourfile, r);
> $message  = array(1 => '<a>', '<b>', '<c>', '<d>', '<e>', '<f>',
> '</c>');
> Here I need some code to get the output look like
> this"<a><b><new><c><d><e><f></c>"
>
> print_r($message);
> fwrite ($fp, $message);
> fclose ($fp);
>
> I am thankful for any help.
>
> Regards
> Jan

You need to do something like:
open file for read
while(condition not met)
  read file line by line into array
endwhile
add your element(s) to the array
read the rest of the file into the array
close file
open file for write [which will truncate the file]
write the array to file
close file

You could perhaps enhance this by writing to say a temp file and once you 
are satisfied the write is complete, rename the temp file to the original.

The 'while condition not met' is the test you use to determine when you 
get to the part of the file where you want to add your bits.

Cheers
-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




If you would like to access /etc/shadow, you probaly make a new extension 
that
interfaces PAM. Is there PAM extensoin for PHP4?? already??. I also would
like to get one if there is.

--
Yasuo Ohgaki

>
>Hi,
>
>Why do you want to access /etc/shadow from your PHP?. As a general
>rules of thumb that's a pretty bad idea. The reason for this is that
>/etc/shadow is owned by Root and it's *should* only be readable by
>Root
>and noone else.
>
>Now in answer to your question "Why your PHP" script can't read
>/etc/shadow is that if you're PHP script is running as Apache module
>(or even a stand alone CGI). Your User ID would most likely *not* be
>Root.
>Thus you are not allowed to read the /etc/shadow.
>
>You are able to fix this by running the Apache process as Root!
>THIS IS A VERY VERY bad idea but possible nonetheless as it is
>a huge security hazard.
>
>To configure Apache to run as Root, check out Apache doc
>
>HTH.
>
> > Hi,
> >
> > I am running apache server as user/group=apache/httpd
> > And want to access the shadow file to authenticate my users
> > from the system.
> >
> > shadow file is owned by root and chmod to 400.
> >
> > server-root:/5:28pm>ls -al /etc/shadow
> > -r--------   1 root     sys         27695 Feb 22 10:06 /etc/shadow
> >
> > I can access the shadow from cgi-bin / c code by giving the
> > chmod +s bit .
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





On Fri, 23 Feb 2001 05:21, Claudia wrote:
> When selecting a value from a dynamically generated list box, the
> subsequent value passed to the table truncates when
> there is a blank in the string
>
> Here is the table structures (Mysql database)
>
> First table has variable course_name (varchar -- length 50)
> This database will be used to generate the dynamic list box for the
> course_name field.
> Second table has variable issue_course_name (varchar -- length50) and
> is the variable that stores the result of the selected
> course name in the dynamic list box.
>
> Here is the code that is currently truncating all characters after the
> space:
>
> td height="41" bgcolor="#FFFFFF">&nbsp;&nbsp;';
>
>      $result = mysql_query("select course_name from coursebuild
>       where course_status = \"in_test\"
>       order by course_name asc");
>
>      echo "<select name='issue_course_name' size=1>";
>      echo "<option value=''> ----Select Course---- \n";
>
>      if ($myrow = mysql_fetch_array($result))
>       {
>      do
>      {
>      echo "<option
> value=$myrow[course_name]>$myrow[course_name]</option>\n";
>      }
>      while ($myrow = mysql_fetch_array($result));
>      echo "</select>";
>
> Insert statement
>
> $query = "insert into testissues ( issue_course_name)
> values ( '$issue_course_name') ";
>   $mysql_result = mysql_query($query, $mysql_link);

IIRC the relevant standards require that values in tags be enclosed in 
quotes if they [are likely to] contain spaces. So at minimum your OPTION 
tags should look like:
echo "<option
 value=\"$myrow[course_name]\">$myrow[course_name]</option>\n";

Having said that, you could handle this better if you have an 
autoincrement field like course_id that uniquely defines each course_name 
record - then you could use the course_id as the VALUE in the option tag; 
you may have to do a lookup at the INSERT stage to get the value of 
course_name.


-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




if i have a form with a select box in it how an i get the values to echo a php value 
...

ie

<SELECT NAME="state" SIZE="1"> 
<OPTION VALUE="Canberra">ACT</OPTION> 
<OPTION VALUE="Victoria">VIC</OPTION> 
</SELECT> 

can i change it to say
<SELECT NAME="state" SIZE="1"> 
<OPTION VALUE="<? echo $state ?>">ACT</OPTION> 
<OPTION VALUE="<?echo $state ?>">VIC</OPTION> 
</SELECT> 

so that when the page loads it shows which ever option is in the Data base?

Peter Houchin
Sun Rentals
[EMAIL PROTECTED]





On Fri, 23 Feb 2001 14:46, Peter Houchin wrote:

> > if i have a form with a select box in it how an i get the values to
> echo a php value ...
 
> ie
> 
> <SELECT NAME="state" SIZE="1"> 
> <OPTION VALUE="Canberra">ACT</OPTION> 
> <OPTION VALUE="Victoria">VIC</OPTION> 
> </SELECT> 
> 
> can i change it to say
> <SELECT NAME="state" SIZE="1"> 
> <OPTION VALUE="<? echo $state ?>">ACT</OPTION> 
> <OPTION VALUE="<?echo $state ?>">VIC</OPTION> 
> </SELECT> 
> 
> so that when the page loads it shows which ever option is in the Data
> base?
 
> Peter Houchin
> Sun Rentals
> [EMAIL PROTECTED]
> 

I think you are asking how to show the selected value?

Something like

<OPTION VALUE="Canberra"
<?php if ($value == 'Canberra') {
  echo ' SELECTED ';
}
>ACT</OPTION>

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




well...i just finished some code for dealing with an option box that has all
the states listed...

<select name="state" size="1">
<option value="">Select State</option>
<?
$ST[] = 'AL';           $ST[] = 'AK';           $ST[] = 'AR';           $ST[] = 'AZ';
$ST[] = 'CA';           $ST[] = 'CO';           $ST[] = 'CT';           $ST[] = 'DC';
$ST[] = 'DE';           $ST[] = 'FL';           $ST[] = 'GA';           $ST[] = 'HI';
$ST[] = 'IA';           $ST[] = 'ID';           $ST[] = 'IL';           $ST[] = 'IN';
$ST[] = 'KS';           $ST[] = 'KY';           $ST[] = 'LA';           $ST[] = 'MA';
$ST[] = 'MD';           $ST[] = 'ME';           $ST[] = 'MI';           $ST[] = 'MN';
$ST[] = 'MO';           $ST[] = 'MS';           $ST[] = 'MT';           $ST[] = 'NC';
$ST[] = 'ND';           $ST[] = 'NE';           $ST[] = 'NH';           $ST[] = 'NJ';
$ST[] = 'NM';           $ST[] = 'NV';           $ST[] = 'NY';           $ST[] = 'OH';
$ST[] = 'OK';           $ST[] = 'OR';           $ST[] = 'PA';           $ST[] = 'PR';
$ST[] = 'RI';           $ST[] = 'SC';           $ST[] = 'SD';           $ST[] = 'TN';
$ST[] = 'TX';           $ST[] = 'UT';           $ST[] = 'VA';           $ST[] = 'VT';
$ST[] = 'WA';           $ST[] = 'WV';           $ST[] = 'WI';           $ST[] = 'WY';
for($i = 0; $i < count($ST); $i++)
{
        echo '<option value="'.$ST[$i].'"';
        if($state == $ST[$i])
        {
                echo ' selected';
        }
        echo '>'.$ST[$i]."</option>\n";
}//For
?>
</select>

First it creates an array $ST that contains a list of all the states
(includes PR and DC)
Next it loops through that array and if $state has the same value as the
state, it selects it...

You could probably turn this into a function or something...

=codeboy

> -----Original Message-----
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 22, 2001 8:17 PM
> To: PHP MAIL GROUP
> Subject: [PHP] <select name=....
>
>
> if i have a form with a select box in it how an i get the values
> to echo a php value ...
>
> ie
>
> <SELECT NAME="state" SIZE="1">
> <OPTION VALUE="Canberra">ACT</OPTION>
> <OPTION VALUE="Victoria">VIC</OPTION>
> </SELECT>
>
> can i change it to say
> <SELECT NAME="state" SIZE="1">
> <OPTION VALUE="<? echo $state ?>">ACT</OPTION>
> <OPTION VALUE="<?echo $state ?>">VIC</OPTION>
> </SELECT>
>
> so that when the page loads it shows which ever option is in the
> Data base?
>
> Peter Houchin
> Sun Rentals
> [EMAIL PROTECTED]
>
>





From: "Jonathan Sharp" <[EMAIL PROTECTED]>

> well...i just finished some code for dealing with an option box that has
all
> the states listed...
>
> <select name="state" size="1">
> <option value="">Select State</option>
> <?
> $ST[] = 'AL'; $ST[] = 'AK'; $ST[] = 'AR'; $ST[] = 'AZ';
> $ST[] = 'CA'; $ST[] = 'CO'; $ST[] = 'CT'; $ST[] = 'DC';
> $ST[] = 'DE'; $ST[] = 'FL'; $ST[] = 'GA'; $ST[] = 'HI';
> $ST[] = 'IA'; $ST[] = 'ID'; $ST[] = 'IL'; $ST[] = 'IN';
> $ST[] = 'KS'; $ST[] = 'KY'; $ST[] = 'LA'; $ST[] = 'MA';
> $ST[] = 'MD'; $ST[] = 'ME'; $ST[] = 'MI'; $ST[] = 'MN';
> $ST[] = 'MO'; $ST[] = 'MS'; $ST[] = 'MT'; $ST[] = 'NC';
> $ST[] = 'ND'; $ST[] = 'NE'; $ST[] = 'NH'; $ST[] = 'NJ';
> $ST[] = 'NM'; $ST[] = 'NV'; $ST[] = 'NY'; $ST[] = 'OH';
> $ST[] = 'OK'; $ST[] = 'OR'; $ST[] = 'PA'; $ST[] = 'PR';
> $ST[] = 'RI'; $ST[] = 'SC'; $ST[] = 'SD'; $ST[] = 'TN';
> $ST[] = 'TX'; $ST[] = 'UT'; $ST[] = 'VA'; $ST[] = 'VT';
> $ST[] = 'WA'; $ST[] = 'WV'; $ST[] = 'WI'; $ST[] = 'WY';
> for($i = 0; $i < count($ST); $i++)
> {
> echo '<option value="'.$ST[$i].'"';
> if($state == $ST[$i])
> {
> echo ' selected';
> }
> echo '>'.$ST[$i]."</option>\n";
> }//For
> ?>
> </select>
>
> First it creates an array $ST that contains a list of all the states
> (includes PR and DC)
> Next it loops through that array and if $state has the same value as the
> state, it selects it...
>
> You could probably turn this into a function or something...
>
> =codeboy
>



Or better would be:

<?php
    $states = array('AL', 'AK', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE',
        'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA',
'MD',
        'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ',
        'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'PR', 'RI', 'SC', 'SD',
        'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WV', 'WI', 'WY');

    foreach ($states as $s)
    {
        echo "<option value=\"$s\"";
        if ($state == $s) echo " selected";
        echo ">$s</option>";
    }
?>


PHP has many syntax features and language constructs which can significantly
improve code performance and manageability -- use them!

Now this code could easily be extended to give each state a descriptive
name, and to create a generic listbox-drawing function which you can then
re-use elsewhere in your program (or as a code snippet which you can use in
other programs in the future!):


<?php
    function drawListBox ($name, $data, $selectedvalue="")
    {
        echo "<select name=\"$name\">\n";
        foreach ($data as $key => $value)
        {
            echo "<option value=\"$key\"";
            if ($selectedvalue == $key) echo " selected";
            echo ">$value</option>\n";
        }
        echo "</select>";
    }

    $states = array(
        "AL" => "Alabama",
        "AK" => "Arkansas",
        "AZ" => "Arizona",
        ... etc
        "WY" => "Wyoming"
    );

    drawListBox("state", $states, $state);
?>


When it comes to programming, in many ways "laziness is a virtue". Instead
of writing the same code 10 times over in subtly different ways, write it
once and make it reusable! Not only does this save you time, it can make
your program less buggy and easier to upgrade.

</lecture> :)


Cheers

Simon Garner





Chris,

It worked! Thanks so much! Weberdev needs to fix it too.

Navid

-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Counter Help


change

$row[count]

to

$row['count']

it thinks the work [count] is some kind of conastant, it doesnt know you
mean (string) 'count'


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""Navid Yar"" <[EMAIL PROTECTED]> wrote in message
000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]...
> Can someone help me with this script? It is an example from weberdev.com.
I
> ran it and it gave me the following error...
>
> -- Warning: Use of undefined constant count - assumed 'count' in
> c:\windows\desktop\localhost\examples\counter\counter1.php on line 27
> 25
>
> The number 25 is the correct number for the counter, but how do I get rid
of
> that error message that keeps coming up before the counter number (25)? I
am
> testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL
> 3.23.33. Here is the script:
>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> </HEAD>
>
> <BODY>
>
> <!-- This example from
>
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
>  -->
>
> <?php
> $hostname = 'localhost';
> $username = 'username';
> $password = 'password';
> $dbName = 'database';
> MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to
> database");
> @mysql_select_db("$dbName") or die("Unable to select database");
>
> $name = "$SCRIPT_NAME";
>
> $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or
die
> ("Bad query: ".mysql_error());
> $row = mysql_fetch_array($result);
>
> if($row){
> MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')")
or
> die ("Bad query: ".mysql_error());
> $count = $row[count];
> }else{
> MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad
> query: ".mysql_error());
> $count = '1';
> }
> echo $count;
> ?>
>
> </BODY>
> </HTML>
>
> -- Navid
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





From: "Chris Lee" <[EMAIL PROTECTED]>

> change
>
> $row[count]
>
> to
>
> $row['count']
>
> it thinks the work [count] is some kind of conastant, it doesnt know you
> mean (string) 'count'
>


<rant>

I have noticed a lot of people do not put quotes on their array indexes
(e.g. VBulletin is a prime offender) - imho this is a really bad practice
because your code becomes ambiguous.

Example:

<?php
    define("foo", "donkey");

    $test = array("foo"=>"orange", "bar"=>"purple");

    echo $test[foo];
?>

Now, I think that should print nothing (or an error), because there is no
index matching "donkey" (the value of the constant "foo"). But for some
reason PHP looks for an array index matching the string "foo" as well,
encouraging this kind of sloppy programming.


Regards

Simon Garner





Thanks for the great suggestion Simon, I'll definatley keep that in mind.
I'm new to PHP, and the counter thing was "copied" off of Weberdev.com. They
forgot to add the single quotes around counter. At least this experience
helped me learn something new. Again, I thank you for your help and for
Chris' help.

Navid

-----Original Message-----
From: Simon Garner [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 10:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Counter Help


From: "Chris Lee" <[EMAIL PROTECTED]>

> change
>
> $row[count]
>
> to
>
> $row['count']
>
> it thinks the work [count] is some kind of conastant, it doesnt know you
> mean (string) 'count'
>


<rant>

I have noticed a lot of people do not put quotes on their array indexes
(e.g. VBulletin is a prime offender) - imho this is a really bad practice
because your code becomes ambiguous.

Example:

<?php
    define("foo", "donkey");

    $test = array("foo"=>"orange", "bar"=>"purple");

    echo $test[foo];
?>

Now, I think that should print nothing (or an error), because there is no
index matching "donkey" (the value of the constant "foo"). But for some
reason PHP looks for an array index matching the string "foo" as well,
encouraging this kind of sloppy programming.


Regards

Simon Garner


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





WeberDev will fix it ASAP if you tell it the number of the example :)

Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 

-----Original Message-----
From: Navid Yar [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 6:25 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Counter Help


Chris,

It worked! Thanks so much! Weberdev needs to fix it too.

Navid

-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Counter Help


change

$row[count]

to

$row['count']

it thinks the work [count] is some kind of conastant, it doesnt know you
mean (string) 'count'


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""Navid Yar"" <[EMAIL PROTECTED]> wrote in message
000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]...
> Can someone help me with this script? It is an example from weberdev.com.
I
> ran it and it gave me the following error...
>
> -- Warning: Use of undefined constant count - assumed 'count' in
> c:\windows\desktop\localhost\examples\counter\counter1.php on line 27
> 25
>
> The number 25 is the correct number for the counter, but how do I get rid
of
> that error message that keeps coming up before the counter number (25)? I
am
> testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL
> 3.23.33. Here is the script:
>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> </HEAD>
>
> <BODY>
>
> <!-- This example from
>
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
>  -->
>
> <?php
> $hostname = 'localhost';
> $username = 'username';
> $password = 'password';
> $dbName = 'database';
> MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to
> database");
> @mysql_select_db("$dbName") or die("Unable to select database");
>
> $name = "$SCRIPT_NAME";
>
> $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or
die
> ("Bad query: ".mysql_error());
> $row = mysql_fetch_array($result);
>
> if($row){
> MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')")
or
> die ("Bad query: ".mysql_error());
> $count = $row[count];
> }else{
> MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad
> query: ".mysql_error());
> $count = '1';
> }
> echo $count;
> ?>
>
> </BODY>
> </HTML>
>
> -- Navid
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Actually, I couldn't find the article number for that tutorial. I did,
however, place a comment directly into that specific web page with the fix.
Here is a direct link to the tutorial (I left the frames out):
http://www.weberdev.com/ViewArticle.php3?ArticleID=30. Thanks.

Navid

-----Original Message-----
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 12:50 AM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] Counter Help


WeberDev will fix it ASAP if you tell it the number of the example :)

Sincerely

      berber

Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.


-----Original Message-----
From: Navid Yar [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 6:25 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Counter Help


Chris,

It worked! Thanks so much! Weberdev needs to fix it too.

Navid

-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Counter Help


change

$row[count]

to

$row['count']

it thinks the work [count] is some kind of conastant, it doesnt know you
mean (string) 'count'


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""Navid Yar"" <[EMAIL PROTECTED]> wrote in message
000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]...
> Can someone help me with this script? It is an example from weberdev.com.
I
> ran it and it gave me the following error...
>
> -- Warning: Use of undefined constant count - assumed 'count' in
> c:\windows\desktop\localhost\examples\counter\counter1.php on line 27
> 25
>
> The number 25 is the correct number for the counter, but how do I get rid
of
> that error message that keeps coming up before the counter number (25)? I
am
> testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL
> 3.23.33. Here is the script:
>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> </HEAD>
>
> <BODY>
>
> <!-- This example from
>
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
>  -->
>
> <?php
> $hostname = 'localhost';
> $username = 'username';
> $password = 'password';
> $dbName = 'database';
> MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to
> database");
> @mysql_select_db("$dbName") or die("Unable to select database");
>
> $name = "$SCRIPT_NAME";
>
> $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or
die
> ("Bad query: ".mysql_error());
> $row = mysql_fetch_array($result);
>
> if($row){
> MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')")
or
> die ("Bad query: ".mysql_error());
> $count = $row[count];
> }else{
> MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad
> query: ".mysql_error());
> $count = '1';
> }
> echo $count;
> ?>
>
> </BODY>
> </HTML>
>
> -- Navid
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





Fixed.

Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 

-----Original Message-----
From: Navid Yar [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 10:39 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Counter Help


Actually, I couldn't find the article number for that tutorial. I did,
however, place a comment directly into that specific web page with the fix.
Here is a direct link to the tutorial (I left the frames out):
http://www.weberdev.com/ViewArticle.php3?ArticleID=30. Thanks.

Navid

-----Original Message-----
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 12:50 AM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] Counter Help


WeberDev will fix it ASAP if you tell it the number of the example :)

Sincerely

      berber

Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.


-----Original Message-----
From: Navid Yar [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 6:25 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Counter Help


Chris,

It worked! Thanks so much! Weberdev needs to fix it too.

Navid

-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Counter Help


change

$row[count]

to

$row['count']

it thinks the work [count] is some kind of conastant, it doesnt know you
mean (string) 'count'


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""Navid Yar"" <[EMAIL PROTECTED]> wrote in message
000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]...
> Can someone help me with this script? It is an example from weberdev.com.
I
> ran it and it gave me the following error...
>
> -- Warning: Use of undefined constant count - assumed 'count' in
> c:\windows\desktop\localhost\examples\counter\counter1.php on line 27
> 25
>
> The number 25 is the correct number for the counter, but how do I get rid
of
> that error message that keeps coming up before the counter number (25)? I
am
> testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL
> 3.23.33. Here is the script:
>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> </HEAD>
>
> <BODY>
>
> <!-- This example from
>
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
>  -->
>
> <?php
> $hostname = 'localhost';
> $username = 'username';
> $password = 'password';
> $dbName = 'database';
> MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to
> database");
> @mysql_select_db("$dbName") or die("Unable to select database");
>
> $name = "$SCRIPT_NAME";
>
> $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or
die
> ("Bad query: ".mysql_error());
> $row = mysql_fetch_array($result);
>
> if($row){
> MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')")
or
> die ("Bad query: ".mysql_error());
> $count = $row[count];
> }else{
> MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad
> query: ".mysql_error());
> $count = '1';
> }
> echo $count;
> ?>
>
> </BODY>
> </HTML>
>
> -- Navid
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




I'm using a remote host, and when I call mail() with all the var's pulling
values from form fields, it still shows as nobody in from header. Is this a
server situation? Theyre using php4 support and they claim its that I'm not
using appropriate variables in the function.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





From: "W.D." <[EMAIL PROTECTED]>

> I'm using a remote host, and when I call mail() with all the var's pulling
> values from form fields, it still shows as nobody in from header. Is this
a
> server situation? Theyre using php4 support and they claim its that I'm
not
> using appropriate variables in the function.
>
>


You have to set the From header manually:


<?php
    $to = "[EMAIL PROTECTED]";
    $from = "[EMAIL PROTECTED]";
    $subject = "Blah";
    $body = "Lorem ipsum dolor sit amet.";

    mail($to, $subject, $body, "From: $from");
?>


http://www.php.net/manual/en/function.mail.php


Regards

Simon Garner





so there is no way to pull this variable from an email form field?




> From: "W.D." <[EMAIL PROTECTED]>
>
> > I'm using a remote host, and when I call mail() with all the var's
pulling
> > values from form fields, it still shows as nobody in from header. Is
this
> a
> > server situation? Theyre using php4 support and they claim its that I'm
> not
> > using appropriate variables in the function.
> >
> >
>
>
> You have to set the From header manually:
>
>
> <?php
>     $to = "[EMAIL PROTECTED]";
>     $from = "[EMAIL PROTECTED]";
>     $subject = "Blah";
>     $body = "Lorem ipsum dolor sit amet.";
>
>     mail($to, $subject, $body, "From: $from");
> ?>
>
>
> http://www.php.net/manual/en/function.mail.php
>
>
> Regards
>
> Simon Garner


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





From: "W.D." <[EMAIL PROTECTED]>

> so there is no way to pull this variable from an email form field?
>


Eh? Of course, $from can be set by a form field if you want. Or a database,
or any way you can set a variable. Then pass it to mail(), per my last
message.




>
>
> > From: "W.D." <[EMAIL PROTECTED]>
> >
> > > I'm using a remote host, and when I call mail() with all the var's
> pulling
> > > values from form fields, it still shows as nobody in from header. Is
> this
> > a
> > > server situation? Theyre using php4 support and they claim its that
I'm
> > not
> > > using appropriate variables in the function.
> > >
> > >
> >
> >
> > You have to set the From header manually:
> >
> >
> > <?php
> >     $to = "[EMAIL PROTECTED]";
> >     $from = "[EMAIL PROTECTED]";
> >     $subject = "Blah";
> >     $body = "Lorem ipsum dolor sit amet.";
> >
> >     mail($to, $subject, $body, "From: $from");
> > ?>
> >
> >
> > http://www.php.net/manual/en/function.mail.php
> >
> >
> > Regards
> >
> > Simon Garner
>






On Fri, 23 Feb 2001 16:32, W.D. wrote:
> so there is no way to pull this variable from an email form field?
>
> > From: "W.D." <[EMAIL PROTECTED]>
> >
> > > I'm using a remote host, and when I call mail() with all the var's
>
> pulling
>
> > > values from form fields, it still shows as nobody in from header.
> > > Is
>
> this
>
> > a
> >
> > > server situation? Theyre using php4 support and they claim its that
> > > I'm
> >
> > not
> >
> > > using appropriate variables in the function.
> >
> > You have to set the From header manually:
> >
> >
> > <?php
> >     $to = "[EMAIL PROTECTED]";
> >     $from = "[EMAIL PROTECTED]";
> >     $subject = "Blah";
> >     $body = "Lorem ipsum dolor sit amet.";
> >
> >     mail($to, $subject, $body, "From: $from");
> > ?>
> >
> >
> > http://www.php.net/manual/en/function.mail.php
> >
> >
> > Regards
> >
> > Simon Garner

Well, you can use a variable from _anywhere_ Simon's example uses a 
variable set locally just so you can see exactly what is going on.

But if you had a form element called, say, reply_address in which the 
user types an email address, you could pass that as the fourth argument 
to mail().

Of course, in this case you have no control over the accuracy or validity 
of the address entered. But that's a whole different question - search 
the archives for info on validating email addresses. And somebody has 
published a class somewhere?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




well this is actually what I did tho, I used an $email var and set it too
$from which I used mail()....and it still came out as nobody



> From: "W.D." <[EMAIL PROTECTED]>
>
> > so there is no way to pull this variable from an email form field?
> >
>
>
> Eh? Of course, $from can be set by a form field if you want. Or a
database,
> or any way you can set a variable. Then pass it to mail(), per my last
> message.
>
>
>
>
> >
> >
> > > From: "W.D." <[EMAIL PROTECTED]>
> > >
> > > > I'm using a remote host, and when I call mail() with all the var's
> > pulling
> > > > values from form fields, it still shows as nobody in from header. Is
> > this
> > > a
> > > > server situation? Theyre using php4 support and they claim its that
> I'm
> > > not
> > > > using appropriate variables in the function.
> > > >
> > > >
> > >
> > >
> > > You have to set the From header manually:
> > >
> > >
> > > <?php
> > >     $to = "[EMAIL PROTECTED]";
> > >     $from = "[EMAIL PROTECTED]";
> > >     $subject = "Blah";
> > >     $body = "Lorem ipsum dolor sit amet.";
> > >
> > >     mail($to, $subject, $body, "From: $from");
> > > ?>
> > >
> > >
> > > http://www.php.net/manual/en/function.mail.php
> > >
> > >
> > > Regards
> > >
> > > Simon Garner
> >
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





From: "W.D." <[EMAIL PROTECTED]>

> well this is actually what I did tho, I used an $email var and set it too
> $from which I used mail()....and it still came out as nobody
>


Can you show us the PHP code you're using please.

Ta





> > From: "W.D." <[EMAIL PROTECTED]>
> >
> > > so there is no way to pull this variable from an email form field?
> > >
> >
> >
> > Eh? Of course, $from can be set by a form field if you want. Or a
> database,
> > or any way you can set a variable. Then pass it to mail(), per my last
> > message.
> >
> >
> >
> >
> > >
> > >
> > > > From: "W.D." <[EMAIL PROTECTED]>
> > > >
> > > > > I'm using a remote host, and when I call mail() with all the var's
> > > pulling
> > > > > values from form fields, it still shows as nobody in from header.
Is
> > > this
> > > > a
> > > > > server situation? Theyre using php4 support and they claim its
that
> > I'm
> > > > not
> > > > > using appropriate variables in the function.
> > > > >
> > > > >
> > > >
> > > >
> > > > You have to set the From header manually:
> > > >
> > > >
> > > > <?php
> > > >     $to = "[EMAIL PROTECTED]";
> > > >     $from = "[EMAIL PROTECTED]";
> > > >     $subject = "Blah";
> > > >     $body = "Lorem ipsum dolor sit amet.";
> > > >
> > > >     mail($to, $subject, $body, "From: $from");
> > > > ?>
> > > >
> > > >
> > > > http://www.php.net/manual/en/function.mail.php
> > > >
> > > >
> > > > Regards
> > > >
> > > > Simon Garner
> > >
> >
>
>
>





<form method="POST" action="<?php print ($PHP_SELF);?>">
First Name: <input type=TEXT name="FirstName" size=15><p>
Last Name: <input type=TEXT name="LastName" size=25><p>
E-mail Address: <input type=TEXT name="Email" size=25><p>
<textarea name="Info" rows="5" cols="40" wrap=SOFT>Ask a
Question</textarea><p>
<input type=SUBMIT> <input type=RESET>
</font>
</form>


<?php
$from = $FirstName ." ". $LastName;
$subject = $Email;
$message = $Info;
mail("[EMAIL PROTECTED], [EMAIL PROTECTED], $subject, $message, $from);
?>



> From: "W.D." <[EMAIL PROTECTED]>
>
> > well this is actually what I did tho, I used an $email var and set it
too
> > $from which I used mail()....and it still came out as nobody
> >
>
>
> Can you show us the PHP code you're using please.
>
> Ta
>
>
>
>
>
> > > From: "W.D." <[EMAIL PROTECTED]>
> > >
> > > > so there is no way to pull this variable from an email form field?
> > > >
> > >
> > >
> > > Eh? Of course, $from can be set by a form field if you want. Or a
> > database,
> > > or any way you can set a variable. Then pass it to mail(), per my last
> > > message.
> > >
> > >
> > >
> > >
> > > >
> > > >
> > > > > From: "W.D." <[EMAIL PROTECTED]>
> > > > >
> > > > > > I'm using a remote host, and when I call mail() with all the
var's
> > > > pulling
> > > > > > values from form fields, it still shows as nobody in from
header.
> Is
> > > > this
> > > > > a
> > > > > > server situation? Theyre using php4 support and they claim its
> that
> > > I'm
> > > > > not
> > > > > > using appropriate variables in the function.
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > You have to set the From header manually:
> > > > >
> > > > >
> > > > > <?php
> > > > >     $to = "[EMAIL PROTECTED]";
> > > > >     $from = "[EMAIL PROTECTED]";
> > > > >     $subject = "Blah";
> > > > >     $body = "Lorem ipsum dolor sit amet.";
> > > > >
> > > > >     mail($to, $subject, $body, "From: $from");
> > > > > ?>
> > > > >
> > > > >
> > > > > http://www.php.net/manual/en/function.mail.php
> > > > >
> > > > >
> > > > > Regards
> > > > >
> > > > > Simon Garner
> > > >
> > >
> >
> >
> >


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





From: "W.D." <[EMAIL PROTECTED]>

> <form method="POST" action="<?php print ($PHP_SELF);?>">
> First Name: <input type=TEXT name="FirstName" size=15><p>
> Last Name: <input type=TEXT name="LastName" size=25><p>
> E-mail Address: <input type=TEXT name="Email" size=25><p>
> <textarea name="Info" rows="5" cols="40" wrap=SOFT>Ask a
> Question</textarea><p>
> <input type=SUBMIT> <input type=RESET>
> </font>
> </form>
>
>
> <?php
> $from = $FirstName ." ". $LastName;
> $subject = $Email;
> $message = $Info;
> mail("[EMAIL PROTECTED], [EMAIL PROTECTED], $subject, $message, $from);
> ?>
>


See, your syntax is incorrect :P

Try:

<?php
    $from = $Email;
    $subject = $Email;
    $message = "Question from $FirstName $LastName:\n\n$Info";

    mail("[EMAIL PROTECTED]", $subject, $message, "From: $from\nCc:
[EMAIL PROTECTED]");
?>

I'm assuming you wanted to send a copy to [EMAIL PROTECTED]

Please read the docs for mail(): http://php.net/mail


Regards

Simon Garner





On Fri, 23 Feb 2001 16:52, W.D. wrote:
> <form method="POST" action="<?php print ($PHP_SELF);?>">
> First Name: <input type=TEXT name="FirstName" size=15><p>
> Last Name: <input type=TEXT name="LastName" size=25><p>
> E-mail Address: <input type=TEXT name="Email" size=25><p>
> <textarea name="Info" rows="5" cols="40" wrap=SOFT>Ask a
> Question</textarea><p>
> <input type=SUBMIT> <input type=RESET>
> </font>
> </form>
>
>
> <?php
> $from = $FirstName ." ". $LastName;
> $subject = $Email;
> $message = $Info;
> mail("[EMAIL PROTECTED], [EMAIL PROTECTED], $subject, $message,
> $from); ?>
>

You seem to have gotten a little confuzzed here! $from should contain the 
email address which you are collecting as $Email and presumably $Info is 
the message body and I'm not quite sure what you want in the subject, but 
all you have available is first and last names!

And then, you need a check to see what action should be taken when you 
call this script - at the moment every time you open the script you send, 
or try to send, an empty mail. Perhaps assigning a name and value to your 
submit button and testing for that?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




From: "W.D." <[EMAIL PROTECTED]>

> yea I guess that would work better, I dunno tho, I tried setting $from =
> $Email and the blasted server still served it up as nobody in the header.
> But the rest would make more sense. Yes [EMAIL PROTECTED] would need a copy
to
> trigger an autoresponse. I know I probably seem like someone who hasnt
read
> much php, but Ive actually read a couple php4books, the first an easier
> learning and the second PHP 4 Bible. I'm still a newbie tho so bare with
me.
>


Okay, it sounds like you're forgetting the "From: " prefix in front of
$from.

This prefix is necessary because the mail message you are composing must
come out looking essentially like this (this is what gets given to your SMTP
mail server):



To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Blah

Here is the main body of the message.



Now, PHP's mail() function will automatically insert the To: and Subject:
headers, and the body, from the first three arguments to mail(). But to add
the custom From: and Cc: headers, you have to add them yourself (correctly
formatted as mail headers) using the fourth argument to mail().

Which is how we get to:

mail("[EMAIL PROTECTED]", $subject, $message,
    "From: $from\nCc: [EMAIL PROTECTED]");

Making sense? :)



>
>
> > From: "W.D." <[EMAIL PROTECTED]>
> >
> > > <form method="POST" action="<?php print ($PHP_SELF);?>">
> > > First Name: <input type=TEXT name="FirstName" size=15><p>
> > > Last Name: <input type=TEXT name="LastName" size=25><p>
> > > E-mail Address: <input type=TEXT name="Email" size=25><p>
> > > <textarea name="Info" rows="5" cols="40" wrap=SOFT>Ask a
> > > Question</textarea><p>
> > > <input type=SUBMIT> <input type=RESET>
> > > </font>
> > > </form>
> > >
> > >
> > > <?php
> > > $from = $FirstName ." ". $LastName;
> > > $subject = $Email;
> > > $message = $Info;
> > > mail("[EMAIL PROTECTED], [EMAIL PROTECTED], $subject, $message,
$from);
> > > ?>
> > >
> >
> >
> > See, your syntax is incorrect :P
> >
> > Try:
> >
> > <?php
> >     $from = $Email;
> >     $subject = $Email;
> >     $message = "Question from $FirstName $LastName:\n\n$Info";
> >
> >     mail("[EMAIL PROTECTED]", $subject, $message, "From: $from\nCc:
> > [EMAIL PROTECTED]");
> > ?>
> >
> > I'm assuming you wanted to send a copy to [EMAIL PROTECTED]
> >
> > Please read the docs for mail(): http://php.net/mail
> >
> >
> > Regards
> >
> > Simon Garner
> >






I would like to have the authenticated user name
appear in my apache access web logs but I am not using
HTTP authentication.  I am using phplib to have better
control over the authentication process.
Is there a way to set this apache api variable
from php code so that apache will log these user names?

Bob




I use PHP as script to generate HTML pages using the command
php -q script.php > file.html

I would like to pass some variables to the PHP script so that it
generates a different HTML file.
I tried the -d option but it seems it doesn't work.
Is there any means of doing this ?


Leonard Schneider

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/




From: "Leonard Schneider" <[EMAIL PROTECTED]>

> I use PHP as script to generate HTML pages using the command
> php -q script.php > file.html
> 
> I would like to pass some variables to the PHP script so that it
> generates a different HTML file.
> I tried the -d option but it seems it doesn't work.
> Is there any means of doing this ?
> 
> 
> Leonard Schneider
> 


Easiest way is using environment variables.


<?php
    system("SOME_VAR=blah; php -q script.php > file.html");
?>


Then in script.php you can do:

<?php
    $some_var = getenv("SOME_VAR");
?>


Hope this helps,

Simon Garner





From: "Leonard Schneider" <[EMAIL PROTECTED]>

> Thanks for your reply
>
> Maybe it is dut to that I use a Windows98 OS, but environment variables
> functions don't seem to work. Moreover, I couldn't make the exec() and
> system() commands properly to run php from dos shell. Is it a security
> ?
> Anyway as my first problem is that
> is there any trick to pass variables to php script when executing from
> command line ?
> Is there anyone who would have any idea or trick to help this ?
>
> Leonard Schneider
>


Ah, I'm afraid I have no experience with PHP under Windows so I can't really
help you there sorry.

I'm not aware of any other way than environment variables to pass data to
PHP scripts executed from the command line so you may be out of luck if they
don't work under Windows. Perhaps someone else on this list will be able to
help...


Cheers

Simon Garner



> --- Simon Garner <[EMAIL PROTECTED]> wrote:
> > From: "Leonard Schneider" <[EMAIL PROTECTED]>
> >
> > > I use PHP as script to generate HTML pages using the command
> > > php -q script.php > file.html
> > >
> > > I would like to pass some variables to the PHP script so that it
> > > generates a different HTML file.
> > > I tried the -d option but it seems it doesn't work.
> > > Is there any means of doing this ?
> > >
> > >
> > > Leonard Schneider
> > >
> >
> >
> > Easiest way is using environment variables.
> >
> >
> > <?php
> >     system("SOME_VAR=blah; php -q script.php > file.html");
> > ?>
> >
> >
> > Then in script.php you can do:
> >
> > <?php
> >     $some_var = getenv("SOME_VAR");
> > ?>
> >
> >
> > Hope this helps,
> >
> > Simon Garner
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices!
http://auctions.yahoo.com/





I jsut found a solution working ;))
Thanks to your reply which helped me much.

Here are two example files to see how it works :
<?
        
putenv("LANG=test");
$command=`php -q test.php`;
echo $command;

?>

which calls

<? 

        $lang=`echo %LANG%`;
        echo $lang;
?>

It seems to work under Windows.
Regards,

Leonard Schneider


--- Simon Garner <[EMAIL PROTECTED]> wrote:
> From: "Leonard Schneider" <[EMAIL PROTECTED]>
> 
> > Thanks for your reply
> >
> > Maybe it is dut to that I use a Windows98 OS, but environment
> variables
> > functions don't seem to work. Moreover, I couldn't make the exec()
> and
> > system() commands properly to run php from dos shell. Is it a
> security
> > ?
> > Anyway as my first problem is that
> > is there any trick to pass variables to php script when executing
> from
> > command line ?
> > Is there anyone who would have any idea or trick to help this ?
> >
> > Leonard Schneider
> >
> 
> 
> Ah, I'm afraid I have no experience with PHP under Windows so I can't
> really
> help you there sorry.
> 
> I'm not aware of any other way than environment variables to pass
> data to
> PHP scripts executed from the command line so you may be out of luck
> if they
> don't work under Windows. Perhaps someone else on this list will be
> able to
> help...
> 
> 
> Cheers
> 
> Simon Garner
> 
> 
> 
> > --- Simon Garner <[EMAIL PROTECTED]> wrote:
> > > From: "Leonard Schneider" <[EMAIL PROTECTED]>
> > >
> > > > I use PHP as script to generate HTML pages using the command
> > > > php -q script.php > file.html
> > > >
> > > > I would like to pass some variables to the PHP script so that
> it
> > > > generates a different HTML file.
> > > > I tried the -d option but it seems it doesn't work.
> > > > Is there any means of doing this ?
> > > >
> > > >
> > > > Leonard Schneider
> > > >
> > >
> > >
> > > Easiest way is using environment variables.
> > >
> > >
> > > <?php
> > >     system("SOME_VAR=blah; php -q script.php > file.html");
> > > ?>
> > >
> > >
> > > Then in script.php you can do:
> > >
> > > <?php
> > >     $some_var = getenv("SOME_VAR");
> > > ?>
> > >
> > >
> > > Hope this helps,
> > >
> > > Simon Garner
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great prices!
> http://auctions.yahoo.com/
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/




Why does php self always show php4/php.exe? how do i take  it off?





Guys, I'm former asp guy and a long time Visual FoxPro programer, so I'm
carying some habbits and logic from it.
I'm really glad I switched to php, but some things are confisung me.
One of them are globals. From my understandig, globals are globaly seen
and accessed variables from any script ( when you define global in your
function too ). But in asp, there were couple types or scopes.
Asp got "application" and "session". Application is something like a
virtual directory, and when first time hit, it inicialize itself and
actions like application.on_start fires. You can define your own
application variables, that are "global" for that application. At the
same time it starts a new session, where you can have your own session
vars. All sessions in application can freely access application
variables, which are good for storing connection strings, counter
variables, etc. Session vars are good for login infos, etc.
Now back to php. What I want to know is, if I declare variable global -
is it global for current session or all sessions? I know about
associative arrays, I use it a lot ( i don't want to clutter my scripts
).
And one thing more. What EXACTLY means php configuration value:
register_global?
Does it mean, that all variables are default declared as globals, and I
can see and MODIFY them from any session? Or they are global for the
current session?
Please explain somebody this to me.
TIA
    Dezider.




On Friday 23 February 2001 08:50, Dezider Góra wrote:

Disclaimer: I have never touched ASP, so I'm likely to have gotten 
somethings wrong..

> function too ). But in asp, there were couple types or scopes.
> Asp got "application" and "session". Application is something like a
> virtual directory, and when first time hit, it inicialize itself and
> actions like application.on_start fires. You can define your own
> application variables, that are "global" for that application. At the
> same time it starts a new session, where you can have your own session
> vars. All sessions in application can freely access application
> variables, which are good for storing connection strings, counter
> variables, etc. Session vars are good for login infos, etc.
> Now back to php. What I want to know is, if I declare variable global -
> is it global for current session or all sessions? I know about

It is global for the current invocation of the script (and all code 
included from it). To make variables global between all 
invocations/scripts in a given session, you need to use the session 
management functions of PHP4. Look at the manual and search 
phpbuilder.com for some intro on that.

> And one thing more. What EXACTLY means php configuration value:
> register_global?

If set to "on", PHP automatically generates global vars from values 
passed via GET/POST requests and cookies. Example: calling
http://foo.bar/test.php?answer=42

will call test.php with a global variable $answer set to "42"

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Nothing is more dangerous than an idea if it's the only one you have.

- Emil-Auguste Chartier, "Propos sur la religion", 1938




Hi,

Where can I find PHP 4.0.4pl1 RPM files in order to download ?






> -----Original Message-----
> From: Oguz Demirkapi [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 9:14 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP 4.0.4pl1 RPM download ?
> 
> 
> Hi,
> 
> Where can I find PHP 4.0.4pl1 RPM files in order to download ?
> 
Check www.rpmfind.net.

But in order to get everything to work, you'll have to update more
packages maybe. Compiling it is the better way.

Best regards




During compilation of php4 I have this:
What I have to do ?
Thanks, Enrico

DXML_BYTE_ORDER=12 -g -O2 -c sapi_apache.c 
sapi_apache.c:32: httpd.h: No such file or directory 
sapi_apache.c:33: http_config.h: No such file or directory 
sapi_apache.c:41: http_core.h: No such file or directory 
sapi_apache.c:42: http_main.h: No such file or directory 
sapi_apache.c:43: http_protocol.h: No such file or directory 
sapi_apache.c:44: http_request.h: No such file or directory 
sapi_apache.c:45: http_log.h: No such file or directory 
sapi_apache.c:57: util_script.h: No such file or directory 





Dear Friends & Future Millionaire: 
AS SEEN ON NATIONAL TV: ''Making over half million dollars 
every 4 to 5 months from your home for an investment of only 
$25 U.S. Dollars expense one time'' 
BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before you say 
''Bull'', please read the following. This is the letter you 
have been hearing about on the news lately. Due to the 
popularity of this letter on the Internet, a national weekly 
news program recently devoted an entire show to the 
investigation of this program described below, to see if it 
really can make people money. The show also investigated 
whether or not the program was legal. 
Their findings proved once and for all that there are 
''absolutely NO Laws prohibiting the participation in the 
program and if people can -follow the simple instructions, 
they are bound to make some mega bucks with only $25 out of 
pocket cost''. DUE TO THE RECENT INCREASE OF POPULARITY & 
RESPECT THIS PROGRAM HAS ATTAINED, IT IS CURRENTLY WORKING 
BETTER THAN EVER. 
This is what one had to say: '' Thanks to this profitable 
opportunity. I was approached many times before but each 
time I passed on it. I am so glad I finally joined just to 
see what one could expect in return for the minimal effort 
and money required. To my astonishment, I received total $ 
610,470.00 in 21 weeks, with money still coming in''. Pam 
Hedland, Fort Lee, New Jersey. 
============================================================ 
Here is another testimonial: ''' this program has 
been around for a long time but I never believed in it. But 
one day when I received this again in the mail I decided to 
gamble my $25 on it. I followed the simple instructions and 
walaa ..... 3 weeks later the money started to come in. 
First month I only made $240.00 but the next 2 months after 
that I made a total of $290,000.00. So far, in the past 8 
months by re-entering the program, I have made over 
$710,000.00 and I am playing it again. The key to success in 
this program is to follow the simple steps and NOT change 
anything.'' More testimonials later but first, 
======== PRINT THIS NOW FOR YOUR FUTURE REFERENCE ========== 
(Or Have it E-mailed to you-See Submit Button Below) 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
If you would like to make at least 
$500,000 every 4 to 5 months easily and comfortably, please 
read the following...THEN READ IT AGAIN and AGAIN !!! 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL 
DREAMS WILL COME TRUE, GUARANTEED! INSTRUCTIONS: 
===== Order all 5 reports shown on the list below. ========= 
For each report, send $5 CASH, THE NAME & NUMBER OF THE 
REPORT YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the 
person whose name appears ON THAT LIST next to the report. 
MAKE SURE YOUR RETURN ADDRESS IS ON YOUR ENVELOPE TOP LEFT 
CORNER in case of any mail problems. 
=== When you place your order, make sure you order each of 
the 5 reports. You will need all 5 reports so that you can 
save them on your computer and resell them. YOUR TOTAL COST 
$5 X 5=$25.00. 
=== Within a few days you will receive, vie e-mail, each of 
the 5 reports from these 5 different individuals. Save them 
on your computer so they will be accessible for you to send 
to the 1,000's of people who will order them from you. Also 
make a floppy of these reports and keep it on your desk in 
case something happen to your computer. 
=== IMPORTANT __ DO NOT alter the names of the people who 
are listed next to each report, or their sequence on the 
list, in any way other than what is instructed below in step 
'' 1 through 6 '' or you will lose out on majority of your 
profits. Once you understand the way this works, you will 
also see how it does not work if you change it. Remember, 
this method has been tested, and if you alter, it will NOT 
work !!! People have tried to put their friends/relatives 
names on all five thinking they could get all the money. But 
it does not work this way. Believe us, we all have tried to 
be greedy and then nothing happened. So Do Not try to change 
anything other than what is instructed. Because if you do, 
it will not work for you. Remember, honesty reaps the 
reward!!! 
1.... After you have ordered all 5 reports, take this 
advertisement and REMOVE the name & address of the person in 
REPORT # 5. This person has made it through the cycle and is 
no doubt counting their fortune. 2.... Move the name & 
address in REPORT # 4 down TO REPORT # 5. 3.... Move the 
name & address in REPORT # 3 down TO REPORT # 4. 4.... Move 
the name & address in REPORT # 2 down TO REPORT # 3. 5.... 
Move the name & address in REPORT # 1 down TO REPORT # 2 
6.... Insert YOUR name & address in the REPORT # 1 Position. 
PLEASE MAKE SURE you copy every name & address ACCURATELY! 
============================================================ 

**** Take this entire letter, with the modified list of 
names, and save it on your computer. DO NOT MAKE ANY OTHER 
CHANGES. Save this on a disk as well just in case if you 
lose any data. To assist you with marketing your business on 
the internet, the 5 reports you purchase will provide you 
with invaluable marketing information which includes how to 
send bulk e-mails legally, where to find thousands of free 
classified ads and much more. There are 2 Primary methods to 
get this venture going: 
METHOD # 1: BY SENDING BULK E-MAIL LEGALLY 
============================================================ 
Let's say that you decide to start small, just to see how it 
goes, and we will assume You and those involved send out 
only 5,000 e-mails each. Let's also assume that the mailing 
receive only a 0.2% response (the response could be much 
better but lets just say it is only 0.2%. Also many people 
will send out hundreds of thousands e-mails instead of only 
5,000 each). Continuing with this example, you send out only 
5,000 e-mails. 
With a 0.2% response, that is only 10 orders for report # 1. 
Those 10 people responded by sending out 5,000 e-mail each 
for a total of 50,000. Out of those 50,000 e-mails only 0.2% 
responded with orders. That's=100 people responded and 
ordered Report # 2. 
Those 100 people mail out 5,000 e-mails each for a total of 
500,000 e-mails. The 0.2% response to that is 1000 orders 
for Report # 3. 
Those 1000 people send out 5,000 e-mails each for a total of 
5 million e-mails sent out. The 0.2% response to that is 
10,000 orders for Report # 4. 
Those 10,000 people send out 5,000 e-mails each for a total 
of 50,000,000 (50 million) e-mails. The 0.2% response to 
that is 100,000 orders for Report # 5 THAT'S 100,000 ORDERS 
TIMES $5 EACH=$500,000.00 (half million). 
Your total income in this example is: 1..... $50 + 2..... 
$500 + 3..... $5,000 + 4..... $50,000 + 5..... $500,000 
........ Grand Total=$555,550.00 
NUMBERS DO NOT LIE. GET A PENCIL & PAPER AND FIGURE OUT THE 
WORST POSSIBLE RESPONSES AND NO MATTER HOW YOU CALCULATE IT, 
YOU WILL STILL MAKE A LOT OF MONEY ! 
============================================================ 
REMEMBER FRIEND, THIS IS ASSUMING ONLY 10 PEOPLE ORDERING 
OUT OF 5,000 YOU MAILED TO. Dare to think for a moment what 
would happen if everyone or half or even one 4th of those 
people mailed 100,000 e-mails each or more? There are over 
150 million people on the Internet worldwide and counting. 
Believe me, many people will do just that, and more! 
METHOD # 2 : BY PLACING FREE ADS ON THE INTERNET 
============================================================ 
Advertising on the net is very very inexpensive and there 
are hundreds of FREE places to advertise. Placing a lot of 
free ads on the Internet will easily get a larger response. 
We strongly suggest you start with Method # 1 and add METHOD 
# 2 as you go along. For every $5 you receive, all you must 
do is e-mail them the Report they ordered. That's it. Always 
provide same day service on all orders. 
This will guarantee that the e-mail they send out, with your 
name and address on it, will be prompt because they can not 
advertise until they receive the report. 
====================== AVAILABLE REPORTS==================== 
ORDER EACH REPORT BY ITS NUMBER & NAME ONLY. Notes: Always 
send $5 cash (U.S. CURRENCY) for each Report. Checks NOT 
accepted. Make sure the cash is concealed by wrapping it in 
at least 2 sheets of paper. On one of those sheets of paper, 
Write the NUMBER & the NAME of the Report you are ordering, 
YOUR E-MAIL ADDRESS and your name and postal address. 
PLACE YOUR ORDER FOR THESE REPORTS NOW : 
============================================================ 
REPORT # 1 : ''The Insider's Guide to Advertising 
for Free on the Net'' 
Order Report # 1 from: 
Jeff Nickel
P.O. Box 560005
Charlotte, NC 28256-0005 USA
____________________________________________________________ 
REPORT # 2 : ''The Insider's Guide to Sending Bulk e- 
mail on the Net'' 
Order Report # 2 from : 
D. Gilstrap 
P.O. Box 311079 
Atlanta, GA 31131 USA 
____________________________________________________________ 
REPORT # 3 : ''The Secret to Multilevel marketing on 
the net'' 
Order Report # 3 from: 
Stella Dottir 
2327 1/2 Chartres St. 
New Orleans, LA 70117 USA 
____________________________________________________________ 
REPORT # 4 : ''How to become a millionaire utilizing 
MLM & the Net'' 
Order Report # 4 from: 
Amos Miller 
261 Joost Ave. 
San Francisco, CA 94131 USA 
____________________________________________________________ 
REPORT # 5 : ''HOW TO SEND 1 MILLION E-MAILS FOR FREE'' 
Order Report # 5 from: 
Loren Stone 
P.O. Box 6232 
Clearfield, UT 84089 USA  
____________________________________________________________ 
$$$$$$$$$ YOUR SUCCESS GUIDELINES $$$$$$$$$$$ 
Follow these guidelines to guarantee your success: 
=== If you do not receive at least 10 orders for Report #1 
within 2 weeks, continue sending e-mails until you do. 
=== After you have received 10 orders, 2 to 3 weeks after 
that you should receive 100 orders or more for REPORT # 2. 
If you did not, continue advertising or sending e-mails 
until you do. 
=== Once you have received 100 or more orders for Report # 
2, YOU CAN RELAX, because the system is already working for 
you, and the cash will continue to roll in ! THIS IS 
IMPORTANT TO REMEMBER: Every time your name is moved down on 
the list, you are placed in front of a different report. 
You can KEEP TRACK of your PROGRESS by watching which report 
people are ordering from you. IF YOU WANT TO GENERATE MORE 
INCOME SEND ANOTHER BATCH OF E-MAILS AND START THE WHOLE 
PROCESS AGAIN. There is NO LIMIT to the income you can 
generate from this business !!! 
============================================================ 
FOLLOWING IS A NOTE FROM THE ORIGINATOR OF THIS PROGRAM: You 
have just received information that can give you financial 
freedom for the rest of your life, with NO RISK and JUST A 
LITTLE BIT OF EFFORT. You can make more money in the next 
few weeks and months than you have ever imagined. Follow the 
program EXACTLY AS INSTRUCTED. Do Not change it in any way. 
It works exceedingly well as it is now. Remember to e-mail a 
copy of this exciting report after you have put your name 
and address in Report #1 and moved others to #2 ...........# 
5 as instructed above. One of the people you send this to 
may send out 100,000 or more e-mails and your name will be 
on every one of them. Remember though, the more you send out 
the more potential customers you will reach. So my friend, I 
have given you the ideas, information, materials and 
opportunity to become financially independent. IT IS UP TO 
YOU NOW! 
==================== MORE TESTIMONIALS====================== 
'' My name is Mitchell. My wife, Jody and I live in Chicago. 
I am an accountant with a major U.S. Corporation and I make 
pretty good money. When I received this program I grumbled 
to Jody about receiving ''junk mail''. I made fun of the 
whole thing, spouting my knowledge of the population and 
percentages involved. I ''knew'' it wouldn't work. Jody 
totally ignored my supposed intelligence and few days later 
she jumped in with both feet. I made merciless fun of her, 
and was ready to lay the old ''I told you so'' on her when 
the thing didn't work. Well, the laugh was on me! Within 3 
weeks she had received 50 responses. Within the next 45 days 
she had received total $ 147,200.00 ........... all cash! I 
was shocked. I have joined Jody in her ''hobby''. Mitchell 
Wolf M.D., Chicago, Illinois 
============================================================ 
'' Not being the gambling type, it took me several 
weeks to make up my mind to participate in this plan. But 
conservative that I am, I decided that the initial 
investment was so little that there was just no way that I 
wouldn't get enough orders to at least get my money back''. 
'' I was surprised when I found my medium size post office 
box crammed with orders. I made $319,210.00 in the first 12 
weeks. The nice thing about this deal is that it does not 
matter where people live. There simply isn't a better 
investment with a faster return and so big''. Dan Sondstrom, 
Alberta, Canada 
============================================================ 
'' I had received this program before. I deleted 
it, but later I wondered if I should have given it a try. Of 
course, I had no idea who to contact to get another copy, so 
I had to wait until I was e-mailed again by someone 
else.........11 months passed then it luckily came 
again...... I did not delete this one! I made more than 
$490,000 on my first try and all the money came within 22 
weeks''. Susan De Suza, New York, N.Y. 
============================================================ 
'' It really is a great opportunity to make 
relatively easy money with little cost to you. I followed 
the simple instructions carefully and within 10 days the 
money started to come in. My first month I made $ 20,560.00 
and by the end of third month my total cash count was $ 
362,840.00. Life is beautiful, Thanx to internet''. Fred 
Dellaca, Westport, New Zealand 
============================================================ 
ORDER YOUR REPORTS TODAY AND GET STARTED ON YOUR ROAD TO 
FINANCIAL FREEDOM ! 
============================================================ 
If you have any questions of the legality of this 
program, contact the Office of Associate Director for 
Marketing Practices, Federal Trade Commission, Bureau of 
Consumer Protection, Washington, D.C. 
============================THE END========================= 







Hi,

I started running MacOSX beta on my mac, and noted that apache what 
present (and used as web sharing extention).

The configuration made to apache from MacOSX beta out of the box is 
pretty basic, BUT I noticed that their where plenty of modules 
(mod_ssl, mod_perl, mod_dav, mod_php4, etc....) installed but not 
configured.
I tried to change the config of apache to load php as module:
---
                LoadModule php4_module libexec/libphp4.so
                AddModule mod_php4.c
                AddType application/x-httpd-php .php
---

 From the server-info and server-status pages I get the confirmation 
that PHP iss loaded, but if I start using a script, I get a parse 
error at the first line of code. The test file is a simple <?php echo 
phpinfo(); ?>.

Can anyone help me out on this? Does the php modile need extra 
libraries installed somewhere? Can I figure out why I get a parse 
error.

I can't yet recompile things on MacOSX beta, so I need to find out 
how to get the prepackaged module
-- 
Thierry Coopman - [EMAIL PROTECTED]
My opinions are personal, and have really nothing or nothing to do 
with Keytrade!

Macs suck. All real geeks have a character prompt.




Thierry,

Not sure if you need that 'echo' in there.

Also, if you have problems, compiling PHP / apache under MacOS X isn't THAT
complicated :)

Best regards,
Andrew
--------------------------------------
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.com


> -----Original Message-----
> From: Thierry Coopman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 4:16 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] apache+php on MacOSX
>
>
> Hi,
>
> I started running MacOSX beta on my mac, and noted that apache what
> present (and used as web sharing extention).
>
> The configuration made to apache from MacOSX beta out of the box is
> pretty basic, BUT I noticed that their where plenty of modules
> (mod_ssl, mod_perl, mod_dav, mod_php4, etc....) installed but not
> configured.
> I tried to change the config of apache to load php as module:
> ---
>               LoadModule php4_module libexec/libphp4.so
>               AddModule mod_php4.c
>               AddType application/x-httpd-php .php
> ---
>
>  From the server-info and server-status pages I get the confirmation
> that PHP iss loaded, but if I start using a script, I get a parse
> error at the first line of code. The test file is a simple <?php echo
> phpinfo(); ?>.
>
> Can anyone help me out on this? Does the php modile need extra
> libraries installed somewhere? Can I figure out why I get a parse
> error.
>
> I can't yet recompile things on MacOSX beta, so I need to find out
> how to get the prepackaged module
> --
> Thierry Coopman - [EMAIL PROTECTED]
> My opinions are personal, and have really nothing or nothing to do
> with Keytrade!
>
> Macs suck. All real geeks have a character prompt.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Try this

<?
echo("<script
language=Javascript>window.status='http://www.yoururl".$PHP_SELF."';</script
>");

?>

Joe Njeru,
Nairobi, Kenya






See filesystem functions, your note will be removed
and you will get a standard boilerplate about the
removal.


--- [EMAIL PROTECTED] wrote:
>
virtual("http://musictv.com/Videos/videoband.asp?1178");
> 
> Want work the url above is on another of our sites
> not on the server that is calling the page.
> 
> Any ideas?
> 
>  http://www.php.net/manual/en/function.virtual.php 
> 
> 
> -- 
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


=====
--- Jesus M. Castagnetto <[EMAIL PROTECTED]>

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/




Hi guys!

I'm using a form that refreshes itself when submitting it!
however when it's submitted i make a condition on the value of $submit so as 
to make some instructions but the problem is that the $submit is always 
empty but i can see that the page is reloaded when i submit the form.

Thanks
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





try naming the submit button submitX and then see if $submitX is a var.
----- Original Message -----
From: kaab kaoutar <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 23, 2001 9:58 AM
Subject: [PHP] $submit does not work! strange !!!!!!!!


> Hi guys!
>
> I'm using a form that refreshes itself when submitting it!
> however when it's submitted i make a condition on the value of $submit so
as
> to make some instructions but the problem is that the $submit is always
> empty but i can see that the page is reloaded when i submit the form.
>
> Thanks
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hey

This is my first question and mail to this list...hope u treat me decent =)
My earlier work have been lasso/filemaker (mac)
I´ve been heard that PHP is coming strongly and I have no reason not to
join. How is the relation between PHP/Filemaker?

----------------------*
[knaSen]
icq #23830427 






Hi,

I hade phpPgAdmin problem for RaQ4r servers.

There was no PostgreSQL support as default and I got error as 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fatal error: Call to undefined function: pg_connect() in
/home/sites/home/web/manage/phpPgAdmin/lib.inc.php on line 130
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



I recompile PHP Version 4.0.4pl1 as below and now everything is ok.

1. ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-gd
--with-gettext=/usr --enable-safe-mode
--with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib
--enable-magic-quotes --with-regex=system --with-ttf=/usr/lib/libttf.so
--enable-track-vars --enable-xml --disable-debug --with-interbase=shared
--with-pgsql=/var/lib/pgsql --with-ldap --with-imap 
2. make clean
3. make
4. make install


I hope this helps !






Hi, 

I've written a script to upload image files to a server but need to check to make sure 
there image files so I used the image type posted by the browser but that changes 
depending on the system/browser set-up. What I need to do is open the file once its on 
the server then get the content type so it will always be the same if its valid.

Does anyone know how to do this?

Thanks,
Matt




On Fri, Feb 23, 2001 at 11:08:08AM -0000, Matt wrote: 

> I've written a script to upload image files to a server but need to
> check to make sure there image files so I used the image type posted by
> the browser but that changes depending on the system/browser set-up.
> What I need to do is open the file once its on the server then get the
> content type so it will always be the same if its valid.  > > Does
> anyone know how to do this?

I normally check the mime type to make sure it is a valid image type.
Just check $picture_type for image/pjpeg, image/jpeg, image/gif, etc.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
#define NULL 0           /* silly thing is, we don't even use this */
             -- Larry Wall in perl.c from the perl source code




Hello

I use macintosh and want to make an sql-database...How do I do?

----------------------*
[knaSen]
icq #23830427 






Get an SQL database engine and off you go. MySQL is a good place to start,
and it comes in a Mac OS/X flavour that you can download at
http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.33-apple-rhapsody5.5-po
werpc.tar.gz.

Check out www.mysql.com for more info.


HTH
Jon



-----Original Message-----
From: knaSen [mailto:[EMAIL PROTECTED]]
Sent: 23 February 2001 11:38
To: [EMAIL PROTECTED]
Subject: [PHP] newbie question


Hello

I use macintosh and want to make an sql-database...How do I do?

----------------------*
[knaSen]
icq #23830427 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**********************************************************************




hi list,

can someone please send me   mysql.sock   
( unix redhat 6.2 )

i had a crash - reinstalled the rpm 3.22.32  but this file is missing


thank you






I'm using the file command, which reads an entire file and sticks it into an
array. I'm trying to read a file from mp3.com, and what I get back is
basically that the connection is refused. Doesn't it just load it up like
any browser would load it? Is there an equivalent command that wouldn't try
to make a connection, but would just request the file like any browser would
and then load it that way? I've also tried the fopen command, and I get the
same results.





Estimados:
        He instalado PHP en un servidor Windows NT/2000 y cuando en el primer
archivo php creo una conexion a Oracle, se cae
en la función OCILogon() dando el siguiente error:

Fatal error: Call to undefined function: ocilogon() in
D:\voicenetchile\ROOT-PHP\prueba.php on line 43

        La verdad es que no he podido solucionarlo, y desearía mucho que por favor
me dieran una solución si la tuvieran,
estaré muy agradecido.

        Atte.

Omar Sepúlveda F.
DBA
RimpexChile S.A.





Speak in english, even if some of us can understand you.

Mensaje citado por: Alex sepúlveda <[EMAIL PROTECTED]>:

> Estimados:
>       He instalado PHP en un servidor Windows NT/2000 y cuando en el primer
> archivo php creo una conexion a Oracle, se cae
> en la función OCILogon() dando el siguiente error:
> 
> Fatal error: Call to undefined function: ocilogon() in
> D:\voicenetchile\ROOT-PHP\prueba.php on line 43

Your PHP isn't compiled to support oracle. Compile it, because the binary for
windows that's in the php site is compiled to work with MySQL, not oracle.

>       La verdad es que no he podido solucionarlo, y desearía mucho que por
> favor
> me dieran una solución si la tuvieran,
> estaré muy agradecido.

Pensaste en cambiar de sistema operativo? Linux tal vez?

Saludos... :-) 



System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  [EMAIL PROTECTED]
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------




I have a comma delimited string that I need to parse into an array.  Is
there a PHP function that will do that ?

Many thanks..........

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






Look up the "split" and "explode" functions - they both do basically
the same thing.

$token_list = split(",", $string_to_parse);

HTH.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

Todd Cary [[EMAIL PROTECTED]] wrote:
> I have a comma delimited string that I need to parse into an array.  Is
> there a PHP function that will do that ?
> 
> Many thanks..........
> 
> Todd
> 
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I believe http://www.php.net/manual/en/function.explode.php is what you're
after.

HTH
Jon


-----Original Message-----
From: Todd Cary [mailto:[EMAIL PROTECTED]]
Sent: 23 February 2001 14:41
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing a string


I have a comma delimited string that I need to parse into an array.  Is
there a PHP function that will do that ?

Many thanks..........

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**********************************************************************




Mensaje citado por: Todd Cary <[EMAIL PROTECTED]>:

> I have a comma delimited string that I need to parse into an array.  Is
> there a PHP function that will do that ?

Did you check the string functions? explode for example?

Saludos... ;-)


System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  [EMAIL PROTECTED]
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------




Hello, I am having trouble getting .php3 files to work in php4.0.4pl1.

.php files work fine, but my browser wants to download the .php3 file.

Here are the relevant lines from httpd.conf:

AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps

I'm at a bit of a loss as to why a .php file would work, but a .php3 file
does 
not.

Please CC me on any replies, as I'm not subscribed to the lists.

Thanks!

Hunter




Try doing this in your httpd.conf (replacing what you have now):

AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps


Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here

> Hello, I am having trouble getting .php3 files to work in php4.0.4pl1.
> 
> .php files work fine, but my browser wants to download the .php3 file.
> 
> Here are the relevant lines from httpd.conf:
> 
> AddType application/x-httpd-php .php .php3
> AddType application/x-httpd-php-source .phps
> 
> I'm at a bit of a loss as to why a .php file would work, but 
> a .php3 file
> does 
> not.





Hi,
I have problem with using of "$REMOTE_ADDR" variable.
The variable always return me "127.0.0.1" ( localhost ),

How can I get the IP of the remote host ?

Thanks,
Rosen Marinov








At 09:54 AM 2/23/2001, Rosen wrote:

is the machine that your browsing on the same machine that you have your 
serving software on?

~kurth


>Hi,
>I have problem with using of "$REMOTE_ADDR" variable.
>The variable always return me "127.0.0.1" ( localhost ),
>
>How can I get the IP of the remote host ?
>
>Thanks,
>Rosen Marinov
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





As to the WHY, well, the file extensions are different.  It's like the
difference between a .DOC file and a .TXT file and a .RTF file.  They're all
different, and the parser/executable uses the extension to tell it what to
expect.

Also, after you make changes to your httpd.conf make sure that you STOP and
START the Apache daemon.  That way, the changes get read from the httpd.conf

HTH
Geordon

----- Original Message -----
From: "Hunter Kelly" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, February 23, 2001 8:46 AM
Subject: [PHP-INST] trouble getting .php3 files to work in php4.0.4pl1
(static)


> Hello, I am having trouble getting .php3 files to work in php4.0.4pl1.
>
> .php files work fine, but my browser wants to download the .php3 file.
>
> Here are the relevant lines from httpd.conf:
>
> AddType application/x-httpd-php .php .php3
> AddType application/x-httpd-php-source .phps
>
> I'm at a bit of a loss as to why a .php file would work, but a .php3 file
> does
> not.
>
> Please CC me on any replies, as I'm not subscribed to the lists.
>
> Thanks!
>
> Hunter
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>



Reply via email to