vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Yet more help (https://vborg.vbsupport.ru/showthread.php?t=50211)

Serge 03-15-2003 05:38 PM

Yet more help
 
Ok I need more help so far I have this script/page:

PHP Code:

<?php
include ("sql.php");

$id $_REQUEST['id'];

$result mysql_query("SELECT articleid, title, email, author, body, commentid FROM article WHERE articleid = $id") or
        die (
mysql_error());
        
while (
$row mysql_fetch_array($result))
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<head>
    <title>Surrix - <?php echo $row["title"]; ?></title>
    <style type="text/css">
A:link, A:visited, A:active {
    COLOR: #C9CCD1;
    TEXT-DECORATION: underline;
}
A:hover {
    COLOR: #8CA3C6;
    BACKGROUND-COLOR: #485363;
    }
    </style>
</head>

<body bgcolor="#273549">
<center><img src="logo.jpg"><br></center>
<table bgcolor="#273549" width="900" cellpadding="10" cellspacing="0" border="0">
<tr><td align='center' width =' 150' valign='top'>

<table border="0" cellspacing="0" cellpadding="0" width="150">
<tr>
    <td bgcolor="#CDCBCB" >
<table width="150" border="0" cellspacing="1" cellpadding="3">
<tr>
    <td valign="top" bgcolor="#272F3B">&nbsp;<font color="#FFFFFF"><b>Main Menu</b></font>
    </td>
</tr>
<tr>
    <td bgcolor="#7A8595"><font face="verdana,arial,helvetica" size="1" ><font face="verdana,arial,helvetica" size="1" ><strong><big>?</big></strong> <a href="/index.php">Home</a><br>

<strong><big>?</big></strong> <a href="http://www.surrix.net/forums/index.php">Forums</a><br>
<strong><big>.</big></strong> <a href="http://www.surrix.net/db/">Articles Database</a><br>
<strong><big>?</big></strong> <a href="http://www.surrix.net/links.php">Web Links</a><br>
<strong><big>?</big></strong> <a href="http://www.surrix.net/forums/vbstats.php">Stats</a><br>
    </td>
</tr>
</table>
    </td>

</tr>
</table>

<td valign="top" align="center" width="100%"><table cellpadding="0" cellspacing="0" border="0" bgcolor="000000" align="center" width="100%">
<tr><td vAlign="top" bgColor="000000" width="100%"> 
    </td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
    <td bgcolor="#FFFFFF" >

<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
    <td bgcolor="#272F3B">&nbsp;<font color="#FFFFFF"><b><?php echo "" $row["title"] . " By:  <a href=\"mailto:" $row["email"] . "\">" $row["author"] . "</a>"?></b></font>
    </td>
</tr>
<tr>
    <td bgcolor="#FFFFFF"><font face="verdana,arial,helvetica" size="1" ><table border='0' cellspacing='0' cellpadding='0' width='100%'>
    <tr>
    <td bgcolor='#CDCBCB' width='100%' >
    <table width='100%' border='0' cellspacing='1' cellpadding='3'>

    <tr>
    <th bgcolor='#7A8595' width='100%' align='right'>

    <table width='100%' border='0' cellspacing='0' cellpadding='0' bordercolor='#FFFFFF'>
    <tr><td bgcolor='#7A8595' valign='top' align='justify' bordercolor='#FFFFFF'>
    <?php echo $row["body"];
          echo 
"<a href=\"http://www.surrix.net/forums/newreply.php?action=newreply&threadid=" $row["commentid"] . "\">Comment on this article</a>";
          
mysql_free_result($result);
?>

And I get this error when I run it:
Quote:

Parse error: parse error in /home/surrix/public_html/db/read.php on line 83
Line 83 is the last line of the above code which I don't think there is anything wrong with it. So could someone please help me with it.

mr e 03-15-2003 05:43 PM

your missing the closing } for the while statement :)

lynda 03-15-2003 05:43 PM

You did not end your while loop.

Put a closing bracket } before your mysql_free_result()

lynda 03-15-2003 05:43 PM

I am so not quick enough! :)

Serge 03-15-2003 05:44 PM

Ok thanks.

filburt1 03-15-2003 06:02 PM

Just a request: if you post that many lines of code, please attach it as a file instead for better readability.


All times are GMT. The time now is 12:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00947 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete