Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2003, 05:38 PM
Serge's Avatar
Serge Serge is offline
 
Join Date: Jan 2002
Location: The Matrix
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 03-15-2003, 05:43 PM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

your missing the closing } for the while statement
Reply With Quote
  #3  
Old 03-15-2003, 05:43 PM
lynda's Avatar
lynda lynda is offline
 
Join Date: Nov 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You did not end your while loop.

Put a closing bracket } before your mysql_free_result()
Reply With Quote
  #4  
Old 03-15-2003, 05:43 PM
lynda's Avatar
lynda lynda is offline
 
Join Date: Nov 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am so not quick enough!
Reply With Quote
  #5  
Old 03-15-2003, 05:44 PM
Serge's Avatar
Serge Serge is offline
 
Join Date: Jan 2002
Location: The Matrix
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok thanks.
Reply With Quote
  #6  
Old 03-15-2003, 06:02 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:37 PM.


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.03951 seconds
  • Memory Usage 2,221KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete