Hello James,
If you don't mind could you tell me how I could make the code simpler.
Also I said that I toke code off of it as it was making it so long so
not to blast many lines of not importing stuff to look at.
Sincerly,
Christopher & Missy
On 3/29/06, James Keeline <[EMAIL PROTECTED]> wrote:
> --- Christopher E <[EMAIL PROTECTED]> wrote:
>
> > I just got done writing this peice of code and when I run it I get this:
> > Parse error: parse error in
> > /home/httpd/vhosts/123.org/httpdocs/display/displayall.php on line 90
> >
> > now in the code the last line is 90 and its with a ?> tag
> >
> > here is the code with out all the fields for selecting and arrays
> >
> > ***** Start of Code! *****
> >
> > <?php
> >
> > $dbhost = 'localhost';
> > $dbuser = 'NPDB';
> > $dbpass = '**********';
> > $dbname = 'NF-NPDB';
> >
> > $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error
> > connecting to mysql');
> > mysql_select_db($dbname);
> >
> > $query = "SELECT
> > EIN,
> > PNO,
> > ICN
> >
> > FROM nfnpdb";
> > $result = mysql_query($query);
> >
> > while($row = mysql_fetch_array($result, MYSQL_ASSOC))
> > {
> > echo
> > "{$row['EIN']} ||" .
> > "{$row['PNO']} ||" .
> > "{$row['ICN']} ||";
> > }
> >
> > // Closes the connection to the database
> > mysql_close($conn);
> > ?>
> > ***** End of Code! *****
> >
> > Thanks for any help!
> >
> > Sincerly,
> > christopher & Missy
>
> This doesn't look like 90 lines. I have to assume there is more in your
> version. When PHP
> complains of an error on the last line, it is usually a missing semicolon or
> closing single or
> double quote or paren or curly brace. I don't see that in your code but
> that's what you should
> look for.
>
> Incidentally, the mysql_close() is not needed since the connection will be
> closed when the script
> is finished running. There are other ways to make the code a little simpler.
>
> James
> _____
>
>
> <?php
>
> $dbhost = 'localhost';
> $dbuser = 'NPDB';
> $dbpass = '**********';
> $dbname = 'NF-NPDB';
>
> $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to
> mysql');
> mysql_select_db($dbname);
>
> $query = "SELECT
> EIN,
> PNO,
> ICN
>
> FROM nfnpdb";
>
> $result = mysql_query($query);
>
> while($row = mysql_fetch_assoc($result))
> {
> extract($row);
> echo "$EIN || $PNO || $ICN II";
> }
>
> ?>
>
>
>
> Community email addresses:
> Post message: [email protected]
> Subscribe: [EMAIL PROTECTED]
> Unsubscribe: [EMAIL PROTECTED]
> List owner: [EMAIL PROTECTED]
>
> Shortcut URL to this page:
> http://groups.yahoo.com/group/php-list
> Yahoo! Groups Links
>
>
>
>
>
>
>
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/