Fwd: [PHP] Problem with code...

2011-10-06 Thread tamouse mailing lists
On Thu, Oct 6, 2011 at 7:28 PM, Jason Pruim  wrote:
> Have a question about this block of code

I'm not seeing anything immediately standing out as a problem.

> Sometimes... It is dropping the last $mailmessage line... The payment method 
> in the actual email it sends...

Can you see if the last line is actually in $mailmessage before
sending the email? Maybe it's somehow getting truncated during the
mail step.

*Update:* I just noticed this. The last line has no \r\n termination.
I'm thinking that may be necessary for some mailers/transports/etc?

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



Re: [PHP] Problem with code...

2011-10-06 Thread tamouse mailing lists
On Thu, Oct 6, 2011 at 7:28 PM, Jason Pruim  wrote:
> Have a question about this block of code

I'm not seeing anything immediately standing out as a problem.

> Sometimes... It is dropping the last $mailmessage line... The payment method 
> in the actual email it sends...

Can you see if the last line is actually in $mailmessage before
sending the email? Maybe it's somehow getting truncated during the
mail step.

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



Re: [PHP] Problem with code...

2011-10-06 Thread Tommy Pham
On Thu, Oct 6, 2011 at 7:29 PM, Jason Pruim wrote:

>
> Jason Pruim
> li...@pruimphotography.com
>
>
>
> On Oct 6, 2011, at 9:04 PM, George Langley wrote:
>
> > On 2011-10-06, at 6:28 PM, Jason Pruim wrote:
> >>
> >>  >>
> >> //SETUP VARIABLES
> >>
> >> $mailTo = "li...@pruimphotography.com";
> >> $mailFrom = "li...@pruimphotography.com";
> >> //These 2 can be changed IF you know what you are doing and why!
> >> $returnPath = $mailFrom;
> >> $replyTo = $mailFrom;
> >> $mailSubject = "New Convention registration!";
> >>
> >> $message = "";
> >>
> >> //DO NOT CHANGE UNDER PENALITY OF BEING SLAPPED WITH A WET NOODLE!!!
> >>
> >> $headers = "From: ".$mailFrom."\n";
> >> $headers .= "Return-Path: ".$returnPath."\n";
> >> $headers .= "Reply-To: ".$replyTo."\n";
> >>
> >> function send_email($mailTo, $mailSubject, $mailMessage, $headers) {
> >>
> >>
> >>   if(mail( $mailTo, $mailSubject, $mailMessage, $headers )) {
> >>
> >>   $message = "Thank you for registering!";
> >>
> >>   }else {
> >>   echo "There was an issue with your registration.. Please try again
> later";
> >>   }
> >>
> >> }//Close Function
> >>
> >>
> >> if(!empty($errorCount)) {
> >>
> >>
> >>   }else {
> >>   //Build Email message
> >>   $mailmessage = "Full Name: " . $_POST['firstname'] . " " .
> $_POST['lastname'] . "\n\n";
> >>   $mailmessage .= "Address: " . $_POST['address'] . "\n\n";
> >>   $mailmessage .= "City, State, Zip: " . $_POST['city'] . " " .
> $_POST['state'] . " " . $_POST['zip'] . "\n\n";
> >>   $mailmessage .= "Phone: " . $_POST['phone'] . "\n\n";
> >>   $mailmessage .= "Email address: " . $_POST['email'] . "\n\n";
> >>   if($_POST['affiliation'] == "NFBOther") {
> >>   $mailmessage .= "Chapter Affiliation: " . $_POST['other']
> . "\n\n";
> >>   }else{
> >>   $mailmessage .= "Chapter Affiliation: " .
> $_POST['affiliation'] . "\n\n";
> >>   }
> >>   if($_POST['person'] =="Other"){
> >>   $mailmessage .= "Who will pick up the ticket? " .
> $_POST['Pfirstname'] . " " . $_POST['Llastname'] . "\n\n";
> >>
> >>   }else{
> >>   $mailmessage .= "Who will pick up the ticket? I will pick
> it up my self! \n\n";
> >>
> >>   }
> >>
> >> $mailmessage .= "Payment Method: " . $_POST['paymentMethod'];
> >>
> >>   send_email($mailTo, $mailSubject, $mailmessage, $headers);
> >>   }
> >>
> >> ?>
> >>
> >> Sometimes... It is dropping the last $mailmessage line... The payment
> method in the actual email it sends...
> >>
> >> Anyone have any ideas? I'm stumped
> > 
> >   Hi there. First thought is perhaps it is not getting a value for
> paymentMethod and if it doesn't exist, will the line still get added?
> >   I would always check to see if every post variable isset, before
> adding the line. Can write a default line in its place if missing.
>
> The variable is being set with a default value of nothing else... But for
> some reason it's not bringing it through when the form is submitted...
>
> Any other ideas? hehe :)
>
>
Have you tested with the same payment method to see if somewhere in your
code or a hiccup in the server is causing the problem?  Does that happen to
any or certain payment method (including blank entry)?  I'm guessing it may
happen with only certain payment method.  From the line
if(!empty($errorCount)) {, I presume you have a mechanism in place to
sanitize and validate inputs?  I'd suggest you start troubleshooting from
there.  If this is still development phase, try to bypass that mechanism for
a quick confirmation that is causing the problem.

Regards,
Tommy


Re: [PHP] Problem with code...

2011-10-06 Thread Jason Pruim

Jason Pruim
li...@pruimphotography.com



On Oct 6, 2011, at 9:04 PM, George Langley wrote:

> On 2011-10-06, at 6:28 PM, Jason Pruim wrote:
>> 
>> > 
>> //SETUP VARIABLES
>> 
>> $mailTo = "li...@pruimphotography.com";
>> $mailFrom = "li...@pruimphotography.com";
>> //These 2 can be changed IF you know what you are doing and why!
>> $returnPath = $mailFrom;
>> $replyTo = $mailFrom;
>> $mailSubject = "New Convention registration!";
>> 
>> $message = "";
>> 
>> //DO NOT CHANGE UNDER PENALITY OF BEING SLAPPED WITH A WET NOODLE!!!
>> 
>> $headers = "From: ".$mailFrom."\n";
>> $headers .= "Return-Path: ".$returnPath."\n";
>> $headers .= "Reply-To: ".$replyTo."\n";
>> 
>> function send_email($mailTo, $mailSubject, $mailMessage, $headers) {
>> 
>> 
>>   if(mail( $mailTo, $mailSubject, $mailMessage, $headers )) {
>> 
>>   $message = "Thank you for registering!";
>> 
>>   }else {
>>   echo "There was an issue with your registration.. Please try again 
>> later";
>>   }
>> 
>> }//Close Function
>> 
>> 
>> if(!empty($errorCount)) {
>> 
>> 
>>   }else {
>>   //Build Email message
>>   $mailmessage = "Full Name: " . $_POST['firstname'] . " " . 
>> $_POST['lastname'] . "\n\n";
>>   $mailmessage .= "Address: " . $_POST['address'] . "\n\n";
>>   $mailmessage .= "City, State, Zip: " . $_POST['city'] . " " . 
>> $_POST['state'] . " " . $_POST['zip'] . "\n\n";
>>   $mailmessage .= "Phone: " . $_POST['phone'] . "\n\n";
>>   $mailmessage .= "Email address: " . $_POST['email'] . "\n\n";
>>   if($_POST['affiliation'] == "NFBOther") {
>>   $mailmessage .= "Chapter Affiliation: " . $_POST['other'] . 
>> "\n\n";
>>   }else{
>>   $mailmessage .= "Chapter Affiliation: " . 
>> $_POST['affiliation'] . "\n\n";
>>   }
>>   if($_POST['person'] =="Other"){
>>   $mailmessage .= "Who will pick up the ticket? " . 
>> $_POST['Pfirstname'] . " " . $_POST['Llastname'] . "\n\n";
>> 
>>   }else{
>>   $mailmessage .= "Who will pick up the ticket? I will pick it 
>> up my self! \n\n";
>> 
>>   }
>> 
>> $mailmessage .= "Payment Method: " . $_POST['paymentMethod'];
>> 
>>   send_email($mailTo, $mailSubject, $mailmessage, $headers);
>>   }
>> 
>> ?>
>> 
>> Sometimes... It is dropping the last $mailmessage line... The payment method 
>> in the actual email it sends...
>> 
>> Anyone have any ideas? I'm stumped
> 
>   Hi there. First thought is perhaps it is not getting a value for 
> paymentMethod and if it doesn't exist, will the line still get added?
>   I would always check to see if every post variable isset, before adding 
> the line. Can write a default line in its place if missing.

The variable is being set with a default value of nothing else... But for some 
reason it's not bringing it through when the form is submitted...

Any other ideas? hehe :)



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



Re: [PHP] Problem with code...

2011-10-06 Thread George Langley
On 2011-10-06, at 6:28 PM, Jason Pruim wrote:
> 
>  
> //SETUP VARIABLES
> 
> $mailTo = "li...@pruimphotography.com";
> $mailFrom = "li...@pruimphotography.com";
> //These 2 can be changed IF you know what you are doing and why!
> $returnPath = $mailFrom;
> $replyTo = $mailFrom;
> $mailSubject = "New Convention registration!";
> 
> $message = "";
> 
> //DO NOT CHANGE UNDER PENALITY OF BEING SLAPPED WITH A WET NOODLE!!!
> 
> $headers = "From: ".$mailFrom."\n";
> $headers .= "Return-Path: ".$returnPath."\n";
> $headers .= "Reply-To: ".$replyTo."\n";
> 
> function send_email($mailTo, $mailSubject, $mailMessage, $headers) {
> 
> 
>if(mail( $mailTo, $mailSubject, $mailMessage, $headers )) {
> 
>$message = "Thank you for registering!";
> 
>}else {
>echo "There was an issue with your registration.. Please try again 
> later";
>}
> 
> }//Close Function
> 
> 
> if(!empty($errorCount)) {
> 
> 
>}else {
>//Build Email message
>$mailmessage = "Full Name: " . $_POST['firstname'] . " " . 
> $_POST['lastname'] . "\n\n";
>$mailmessage .= "Address: " . $_POST['address'] . "\n\n";
>$mailmessage .= "City, State, Zip: " . $_POST['city'] . " " . 
> $_POST['state'] . " " . $_POST['zip'] . "\n\n";
>$mailmessage .= "Phone: " . $_POST['phone'] . "\n\n";
>$mailmessage .= "Email address: " . $_POST['email'] . "\n\n";
>if($_POST['affiliation'] == "NFBOther") {
>$mailmessage .= "Chapter Affiliation: " . $_POST['other'] . 
> "\n\n";
>}else{
>$mailmessage .= "Chapter Affiliation: " . 
> $_POST['affiliation'] . "\n\n";
>}
>if($_POST['person'] =="Other"){
>$mailmessage .= "Who will pick up the ticket? " . 
> $_POST['Pfirstname'] . " " . $_POST['Llastname'] . "\n\n";
> 
>}else{
>$mailmessage .= "Who will pick up the ticket? I will pick it 
> up my self! \n\n";
> 
>}
> 
> $mailmessage .= "Payment Method: " . $_POST['paymentMethod'];
> 
>send_email($mailTo, $mailSubject, $mailmessage, $headers);
>}
> 
> ?>
> 
> Sometimes... It is dropping the last $mailmessage line... The payment method 
> in the actual email it sends...
> 
> Anyone have any ideas? I'm stumped

Hi there. First thought is perhaps it is not getting a value for 
paymentMethod and if it doesn't exist, will the line still get added?
I would always check to see if every post variable isset, before adding 
the line. Can write a default line in its place if missing.


George Langley
Interactive Developer

"RIP, Mr. Jobs."



[PHP] Problem with code...

2011-10-06 Thread Jason Pruim
Hi everyone,

Have a question about this block of code



Sometimes... It is dropping the last $mailmessage line... The payment method in 
the actual email it sends...

Anyone have any ideas? I'm stumped


Jason Pruim
li...@pruimphotography.com




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



Re: [PHP] problem with code between 4.3.4rc1 & upgrading to php 4.4.2

2006-02-09 Thread Curt Zirzow
On Thu, Feb 09, 2006 at 04:04:49PM -0500, Brent wrote:
> Hello,
> About 2 years ago i setup   Apache/1.3.28 (Unix) PHP/4.3.4RC1
> mod_ssl/2.8.15 OpenSSL/0.9.7c  and mysql on BSD Unix and did up some
> simple php enabled web pages to add / remove /edit / search  entries to
> a 1 table mysql database to keep track of abuse complaints for my company.
> 
> This week Ive had to migrate all this to new Solaris 10 box which i
> installed Apache/1.3.34 (Unix) PHP/4.4.2 mod_ssl/2.8.25 OpenSSL/0.9.8a
> ...
> ??   I can submit some of the code for everyone to look at  ..  Any help
> is greatly appreciated

This sounds like the old version had register_globals [1] set to on.
You'll want to change your code [2] so it works with it off, like:

  $_GET['variable']; or
  $_POST['variable'];

It is strongly advisable to keep it off.

[1] http://php.net/register_globals
[2] http://php.net/language.variables.predefined

Curt.
-- 
cat .signature: No such file or directory

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



[PHP] problem with code between 4.3.4rc1 & upgrading to php 4.4.2

2006-02-09 Thread Brent
Hello,
About 2 years ago i setup   Apache/1.3.28 (Unix) PHP/4.3.4RC1
mod_ssl/2.8.15 OpenSSL/0.9.7c  and mysql on BSD Unix and did up some
simple php enabled web pages to add / remove /edit / search  entries to
a 1 table mysql database to keep track of abuse complaints for my company.

This week Ive had to migrate all this to new Solaris 10 box which i
installed Apache/1.3.34 (Unix) PHP/4.4.2 mod_ssl/2.8.25 OpenSSL/0.9.8a
with mysql .  The problem im have is that when i go to search for an
entry through the web interface...it pulls ALL entries in the database
and displays them instead of the ones im searching for.  When i go to
add an entry ...it actually enters a entry to mysql ...but its empty. 
If i try to do an edit on an existing entry ...the form doesnt pull the
existing entries from the database to be edited...Im thinking its
probably something with my syntax that im using is no longer valid with
the new versions of php4. Does anyone have any thoughts or suggestions
??   I can submit some of the code for everyone to look at  ..  Any help
is greatly appreciated

-- 
--
Brent 

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



Re: [PHP] Problem with code

2004-12-07 Thread Ryan King
On Dec 5, 2004, at 9:05 PM, Richard Kurth wrote:
I am having a problem with the code below it provides the first page
with out any problem but when I select the next page it shows all the
results from the first page and the results from the second page. It
does the same thing on the third page also. I have been looking at it
for two days and can not fined the error in the code

I don't see where you set $page. And I'm betting that you don't. 
Variables are not persistent from one page-load to the next.

try adding this line in here:
$page = $_GET['page'];

// If current page number, use it
// if not, set one!
if(!isset($page)){
$page = 1;
} else {
$page = $page;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Problem with code

2004-12-06 Thread Richard Kurth
I am having a problem with the code below it provides the first page
with out any problem but when I select the next page it shows all the
results from the first page and the results from the second page. It
does the same thing on the third page also. I have been looking at it
for two days and can not fined the error in the code




 '". $Price1."' OR price <= '". $Price2."')"; 
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range3"){
$Price1="15";
$Price2="20";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')"; 
}
if($Pricerange=="range4")
{$Price1="20";
 $Price2="25";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";  
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range5")
{$Price1="25";
$Price2="30";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')"; 
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range6")
{$Price1="30";
$Price2="";
$sql .= "price >= '". $Price1."'"; 
$sql1 .= "price >= '". $Price1."'";
}}
$sql .= " LIMIT " . $from . "," . $max_results; 
}


$result=safe_query($sql);
while ($row = mysql_fetch_array($result)){
extract($row);
?>



  

  Listing
#
  
  
   

more info...
  $
   










 
 BR /  BA
, 
  


 Select a Page"; 

// Build Previous Link 
if($page > 1){ 
$prev = ($page - 1); 
echo "< "; 
} 

for($i = 1; $i <= $total_pages; $i++){ 
if(($page) == $i){ 
echo "$i "; 
} else { 
echo "$i "; 
} 
} 

// Build Next Link 
if($page < $total_pages){ 
$next = ($page + 1); 
echo "Next>>"; 
} 
echo ""; 


include("$config[template_path]/user_bottom.html");
?>


  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]

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



Re: [PHP] Problem with code

2004-12-06 Thread Greg Donald
On Sun, 5 Dec 2004 21:05:12 -0800, Richard Kurth <[EMAIL PROTECTED]> wrote:
> I am having a problem with the code below it provides the first page
> with out any problem but when I select the next page it shows all the
> results from the first page and the results from the second page. It
> does the same thing on the third page also. I have been looking at it
> for two days and can not fined the error in the code

It's probably the LIMIT clause in your sql query.  Try printing the
sql query on the page and check the limit.

Or use one of the existing pagination classes from PEAR:

http://pear.php.net/package-search.php?pkg_name=page


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



[PHP] Problem with code

2004-12-05 Thread Richard Kurth
I am having a problem with the code below it provides the first page
with out any problem but when I select the next page it shows all the
results from the first page and the results from the second page. It
does the same thing on the third page also. I have been looking at it
for two days and can not fined the error in the code




 '". $Price1."' OR price <= '". $Price2."')"; 
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range3"){
$Price1="15";
$Price2="20";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')"; 
}
if($Pricerange=="range4")
{$Price1="20";
 $Price2="25";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";  
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range5")
{$Price1="25";
$Price2="30";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')"; 
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range6")
{$Price1="30";
$Price2="";
$sql .= "price >= '". $Price1."'"; 
$sql1 .= "price >= '". $Price1."'";
}}
$sql .= " LIMIT " . $from . "," . $max_results; 
}


$result=safe_query($sql);
while ($row = mysql_fetch_array($result)){
extract($row);
?>



  

  Listing
#
  
  
   

more info...
  $
   










 
 BR /  BA
, 
  


 Select a Page"; 

// Build Previous Link 
if($page > 1){ 
$prev = ($page - 1); 
echo "< "; 
} 

for($i = 1; $i <= $total_pages; $i++){ 
if(($page) == $i){ 
echo "$i "; 
} else { 
echo "$i "; 
} 
} 

// Build Next Link 
if($page < $total_pages){ 
$next = ($page + 1); 
echo "Next>>"; 
} 
echo ""; 


include("$config[template_path]/user_bottom.html");
?>


  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]

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



RE: [PHP] problem with code (almost fixed)

2002-11-19 Thread Noor Dawod
You'd write something like:

$_REQUEST['pac_hot'][0], $_REQUEST['pac_hot'][1] and so on.

Noor


> -Original Message-
> From: Yan Grossman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 12:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] problem with code (almost fixed)
> 
> 
> Hi,
> I fixed my code to handle forms using $_REQUEST. Just having 
> problem with
> the fields with multiple contents...
> the one you have to call  like field[0], field[1],etc...
> 
> How do I use the brackets inside brackets?
> my case is this:
> Thanks.
> I have fixed everything with $_REQUEST
> but I am having problem with the multiple fields, like this:
> $message .= ("hotel = " . $_REQUEST['pac_hot[0]'] . " - ".
> $_REQUEST['pac_hot[1]']. " - " .$_REQUEST['pac_hot[2]'] . " -
> ".$_REQUEST['pac_hot[3]'] . "\n");
> 
> How am I going to use the brackets inside the brackets?
> Thanks
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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




[PHP] problem with code (almost fixed)

2002-11-19 Thread Yan Grossman
Hi,
I fixed my code to handle forms using $_REQUEST. Just having problem with
the fields with multiple contents...
the one you have to call  like field[0], field[1],etc...

How do I use the brackets inside brackets?
my case is this:
Thanks.
I have fixed everything with $_REQUEST
but I am having problem with the multiple fields, like this:
$message .= ("hotel = " . $_REQUEST['pac_hot[0]'] . " - ".
$_REQUEST['pac_hot[1]']. " - " .$_REQUEST['pac_hot[2]'] . " -
".$_REQUEST['pac_hot[3]'] . "\n");

How am I going to use the brackets inside the brackets?
Thanks



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




Re: [PHP] Problem with Code

2001-12-16 Thread Attila Strauss

> Hi,
> 
> I have a couple of questions before I get to my problem.
> 
>1. Is there any documentation that explains the differences between
> the versions of PHP?
sure. have a look at the changelog
http://www.php.net/ChangeLog-4.php

> 
>   2. Does it matter when writing php code that you specifiy the file
> name in the following
>manner?  test.php3  test.php4 or whatever.  I'm assumming this is
> version specific.
> 
>   My Problem:
> 
>I have the following code:

[]

> 
> I have the following error:
> 
> 
> Fatal error: Call to unsupported or undefined function include_once() in
> include_fns.php3 on line 7
> 
> It seems to me that include_once is a legal function but I can't the
> orgination of this funtion other
> than that stupid include_fns.php3 file? Any ideas on this.
> 
> Configuration:
> 
> OS: Solaris 2.8 10/00 on Intel Hardware.
> Apache: 1.3.9
> PHP: 3.0.15
> mysql: 3.23.46
> 
> My ISP is running:
> 
> OS: Irix 6.4
> Apache: 1.3.9
> PHP: 3.0.9
> mysql: 3.22.23b
> 
> I do appreciate any help on this.
> 

include_once() was added in PHP 4.0.1pl2 

best regards
attila strauss


-- 
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]




Re: [PHP] Problem with Code

2001-12-16 Thread Jack Dempsey

1. http://www.php.net/ChangeLog-4.php

2. and yes, you have to specify the exact filename...your issue is that
include_once is not a function in php3, if that code is infact from a php3
file...

"Phillip B. Bruce" wrote:

> Hi,
>
> I have a couple of questions before I get to my problem.
>
>1. Is there any documentation that explains the differences between
> the versions of PHP?
>
>   2. Does it matter when writing php code that you specifiy the file
> name in the following
>manner?  test.php3  test.php4 or whatever.  I'm assumming this is
> version specific.
>
>   My Problem:
>
>I have the following code:
>
> # more headlines*
> 
> include "include_fns.php3";
> include "header.php3";
>
> $conn = db_connect();
>
> $pages_sql = "select * from pages order by code";
> $pages_result = mysql_query($pages_sql, $conn);
>
> while ($pages = mysql_fetch_array($pages_result)) {
>
>   $story_sql = "select * from stories
> where page = '$pages[code]'
> and published is not null
> order by published desc";
>   $story_result = mysql_query($story_sql, $conn);
>   if (mysql_num_rows($story_result)) {
> $story = mysql_fetch_array($story_result);
> print "";
> print "";
> print "";
> if ($story[picture])
>   print "";
> print "";
> print "";
> print "$pages[description]";
> print $story[headline];
> print "";
> print "";
> print "";
> print "";
> print "Read more $pages[code] ...";
> print "";
> print "";
>   }
> }
>
> include "footer.php3";
> ?>
> #
>
> I have the following error:
>
> Fatal error: Call to unsupported or undefined function include_once() in
> include_fns.php3 on line 7
>
> It seems to me that include_once is a legal function but I can't the
> orgination of this funtion other
> than that stupid include_fns.php3 file? Any ideas on this.
>
> Configuration:
>
> OS: Solaris 2.8 10/00 on Intel Hardware.
> Apache: 1.3.9
> PHP: 3.0.15
> mysql: 3.23.46
>
> My ISP is running:
>
> OS: Irix 6.4
> Apache: 1.3.9
> PHP: 3.0.9
> mysql: 3.22.23b
>
> I do appreciate any help on this.
>
> --
> 
> *** Phillip B. Bruce ***
> *** http://pbbruce.home.mindspring.com   ***
> *** [EMAIL PROTECTED]   ***
> ***  ***
> *** "Have you ever noticed? Anybody going slower than***
> *** you is an idiot, and anyone going faster than you***
> *** is a maniac." - George Carlin***
> 
>
> --
> 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] Problem with Code

2001-12-16 Thread Phillip B. Bruce

Hi,

I have a couple of questions before I get to my problem.

   1. Is there any documentation that explains the differences between
the versions of PHP?

  2. Does it matter when writing php code that you specifiy the file
name in the following
   manner?  test.php3  test.php4 or whatever.  I'm assumming this is
version specific.

  My Problem:

   I have the following code:

# more headlines*
";
print "";
print "";
if ($story[picture])
  print "";
print "";
print "";
print "$pages[description]";
print $story[headline];
print "";
print "";
print "";
print "";
print "Read more $pages[code] ...";
print "";
print "";
  }
}

include "footer.php3";
?>
#

I have the following error:


Fatal error: Call to unsupported or undefined function include_once() in
include_fns.php3 on line 7

It seems to me that include_once is a legal function but I can't the
orgination of this funtion other
than that stupid include_fns.php3 file? Any ideas on this.

Configuration:

OS: Solaris 2.8 10/00 on Intel Hardware.
Apache: 1.3.9
PHP: 3.0.15
mysql: 3.23.46

My ISP is running:

OS: Irix 6.4
Apache: 1.3.9
PHP: 3.0.9
mysql: 3.22.23b

I do appreciate any help on this.



--

*** Phillip B. Bruce ***
*** http://pbbruce.home.mindspring.com   ***
*** [EMAIL PROTECTED]   ***
***  ***
*** "Have you ever noticed? Anybody going slower than***
*** you is an idiot, and anyone going faster than you***
*** is a maniac." - George Carlin***





-- 
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]