FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


I need help yet again





SpellcasterDX
Only this time, I need a couple of pieces of code fixed, and I also need to know where they would go.

Code:
if($quote == "t" && $postid){
$sql = "SELECT * FROM ".TABLE_POSTS." WHERE ID = '$postid'";
$exe = runQuery($sql);
$row = fetchResultArray($exe);

//then you'd just grab the body from the selected field
$body = $row[body]
//You don't have to make a body variable, but who cares, right? i made it required in the next step, so leave it i guess
}

I need that code fixed, cause it appears to be mis-coded.

Code:
if($body){
//means there is quoted text, so display the quoted text in the textarea
inputtextarea(w/e, w/e)
}else{
//blank text area, so it's without quoted text, regular reply
inputtextarea(w/e, w/e)
}

^I also need that piece re-coded, cause it seems mis-coded as well.

The last part I need help on is adding those 2 pieces of code above into this file:

Code:
<?
$postform = "
<SPAN CLASS='InputSection'>Subject</SPAN><BR>
".inputText("subject", $subject, 60)."
<P>
<SPAN CLASS='InputSection'>Body</SPAN><BR>
<HR>
".inputTextArea("body", $body, 75, 15, "", "", "", "linewrapfix")."<BR>
<SPAN STYLE='font-size: 8pt;'>Special <A HREF='help.php?action=faq#htmlcodes' TARGET='_blank'>mark-up codes</A> are allowed to be used on this board</SPAN>
<P>
<SPAN STYLE='font-size: 8pt;'><font color=darkred>Please read the <A HREF='tos.php'>Terms Of Service</A> before posting. By pressing the POST button
below, you are agreeing to the</font color> <A HREF='tos.php'>TOS</A>.</SPAN>
<P>
";
?>


Could someone please help? Smile
ncwdavid
This might and mighn't work cause I am not sure what you are doing:
Code:

if( ($quote==t)&&($postid){
$sql = "SELECT * FROM table_posts WHERE ID='$postid'";
$exe = mysql_query($sql);
$row = mysql_fetch_array($exe);
}


I am not sure what you need done with the rest of the script. Please explain in detail and saying what is it for might help. Rolling Eyes
SpellcasterDX
ncwdavid wrote:
This might and mighn't work cause I am not sure what you are doing:
Code:

if( ($quote==t)&&($postid){
$sql = "SELECT * FROM table_posts WHERE ID='$postid'";
$exe = mysql_query($sql);
$row = mysql_fetch_array($exe);
}


I am not sure what you need done with the rest of the script. Please explain in detail and saying what is it for might help. Rolling Eyes

It's for a quoting system on my forums. I'm not using phpBB, I'm using DiscoBoards, and it's coded differently from phpBB, so I can't just take the phpBB quoting features.
Alie
Code:
if( ($quote==t)&&($postid){
$sql = "SELECT * FROM table_posts WHERE ID='$postid'";
$exe = mysql_query($sql);
$row = mysql_fetch_array($exe);
}

I think you forgot to add the ) symbol in first row:
Code:

if( ($quote==t)&&($postid) ){
$sql = "SELECT * FROM table_posts WHERE ID='$postid'";
$exe = mysql_query($sql);
$row = mysql_fetch_array($exe);
}
abhinavm24
if the post is still active just ping me, i might be able to provide some help in the context for few months.
i'm free btw for 2 months off from college. Surprised
Related topics
Need Help Yet again :: Comment system, data from 3 tables !!
Send Help
Pepperpot Hot
Some questions
Justification for War in Iraq
New 8 seson of the Charmed
In Search of Non-Corrupt Politicians
New Design Opinons Please?
A debate of religion, science, and more
Paranormal Experiences
Email service
Please help me out creating a logo
Help I am Depressed
Rediculous General Discussion rules.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.