Re: [PHP] Re: Script stuck on final ?>

2005-02-03 Thread Alp
Thanks for pointing it out James. That was it! At least now I do not end up
with a blank browser page, but unfortunately I can not achieve what I am
trying to do though which is inserting the user input to the relevant
tables.

I'll keep on trying my luck/witts until I get it... somehow...

Alp

AND thanks to all of you who persistently tried to get me to check my
brackets, etc for consistency! I should have looked closer to the code.

"James Kaufman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, Feb 03, 2005 at 08:25:43PM +0800, Alp wrote:
> > Thanks to both of you. Unfortunately I have found out it was due to
another
> > reason: in one function I am trying to insert 3 sets of data into 3
seperate
> > tables. In trying to accomplish that I am using a 'for' loop. The minute
I
> > write in the second 'for' loop I loose the page in browser and receive
this
> > parse error pointing to the last line of code.
> >
> > Any ideas to how I can overcome this? The loop I am using is given
below.
> >
> > Thanks in advance.
> >
> > Alp
> > Code:
> >  for ($c=0;$c >   if ($_POST['inctourid'][$c]!="" && $_POST['included'][$c]!=""){
> >$sql = "INSERT INTO tour_includes (tour_id, included) VALUES
> > ('{$_POST['inctourid'][$c]}', '{$_POST['included'][$c]}')\n";
> >   }
> >   if (! mysql_query($sql, $link))
> >{
> >$dberror = mysql_error();
> >return false;
> >}
> > // for ($i=0;$i > //  if ($_POST['extourid'][$c]!="" && $_POST['excluded'][$c]!=""){
> > //   $sql = "INSERT INTO tour_excludes (tour_id, excluded) VALUES
> > ('{$_POST['extourid'][$c]}', '{$_POST['excluded'][$c]}')\n";
> > //  }
> > //  if (! mysql_query($sql, $link))
> > //   {
> > //   $dberror = mysql_error();
> > //   return false;
> > //   }
>
> }   // Add closing brace here
>
> -- 
> Jim Kaufman
> Linux Evangelist
> public key 0x6D802619, CISSP# 65668
> http://www.linuxforbusiness.net
> ---
> The most merciful thing in the world ... is the inability of the human
mind to
> correlate all its contents.
> -- H. P. Lovecraft

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



Re: [PHP] Re: Script stuck on final ?>

2005-02-03 Thread James Kaufman
On Thu, Feb 03, 2005 at 08:25:43PM +0800, Alp wrote:
> Thanks to both of you. Unfortunately I have found out it was due to another
> reason: in one function I am trying to insert 3 sets of data into 3 seperate
> tables. In trying to accomplish that I am using a 'for' loop. The minute I
> write in the second 'for' loop I loose the page in browser and receive this
> parse error pointing to the last line of code.
> 
> Any ideas to how I can overcome this? The loop I am using is given below.
> 
> Thanks in advance.
> 
> Alp
> Code:
>  for ($c=0;$c   if ($_POST['inctourid'][$c]!="" && $_POST['included'][$c]!=""){
>$sql = "INSERT INTO tour_includes (tour_id, included) VALUES
> ('{$_POST['inctourid'][$c]}', '{$_POST['included'][$c]}')\n";
>   }
>   if (! mysql_query($sql, $link))
>{
>$dberror = mysql_error();
>return false;
>}
> // for ($i=0;$i //  if ($_POST['extourid'][$c]!="" && $_POST['excluded'][$c]!=""){
> //   $sql = "INSERT INTO tour_excludes (tour_id, excluded) VALUES
> ('{$_POST['extourid'][$c]}', '{$_POST['excluded'][$c]}')\n";
> //  }
> //  if (! mysql_query($sql, $link))
> //   {
> //   $dberror = mysql_error();
> //   return false;
> //   }

}   // Add closing brace here

-- 
Jim Kaufman
Linux Evangelist
public key 0x6D802619, CISSP# 65668
http://www.linuxforbusiness.net
---
The most merciful thing in the world ... is the inability of the human mind to
correlate all its contents.
-- H. P. Lovecraft

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



Re: [PHP] Re: Script stuck on final ?>

2005-02-03 Thread Jochem Maas
Alp wrote:
Thanks to both of you. Unfortunately I have found out it was due to another
reason: in one function I am trying to insert 3 sets of data into 3 seperate
tables. In trying to accomplish that I am using a 'for' loop. The minute I
write in the second 'for' loop I loose the page in browser and receive this
what does "write in the 'for' loop" mean?
what does "loose the page in the browser" mean?
parse error pointing to the last line of code.
Any ideas to how I can overcome this? The loop I am using is given below.
fix the syntax error, I guess.
Thanks in advance.
Alp
Code:
 for ($c=0;$cwhere is the * closing brace for the for loop?
// for ($i=0;$i

"Alp" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Why would a php script get stuck at the ver last line of code in php/mysql
combination? I'm getting a parse error at the very last line.
Thanks in advance for your help.
Alp

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