Hey guys, tough question here...
I have a config.php file, that lets you set up the site. However, the config needs a variable to set something each time. Hard to explain, let me show you.
PHP Code:
<form action='edit.php?r=".$row['replyID']."' method='post'>
<input class='imgsubmit' type='image' src='images/edit.png' alt='Edit'>
</form>
It's a form. When you submit it, I want it to go to the current replyID, taken from a database. Here's the code that sets the $row field.
PHP Code:
$result = mysql_query("SELECT * FROM $DBpostsTable WHERE threadID = '$threadID' ORDER BY replyID");
while($row = mysql_fetch_array($result))
{
...
}
Ok... A bit tough to understand. Basically $threadID is a number, and it's looking through the database to find all the posts with that threadID on them

. Let's pretend $threadID is 1. That means all posts with a threadID of 1 will show up on the thread.
That replyID (the post ID) is what I need in this include file.
Something like this:
PHP Code:
$result = mysql_query("SELECT * FROM $DBpostsTable WHERE threadID = '$threadID' ORDER BY replyID");
while($row = mysql_fetch_array($result))
{
<form action='edit.php?r=".$row['replyID']."$replyID' method='post'>
<input class='imgsubmit' type='image' src='images/edit.png' alt='Edit'>
</form>
}
Now the above works! But I want the part with the form to be in the config file so I don't have to keep changing EVERY SINGLE PAGE using that 'algorithm' (I guess) to make 1 little change.
Any help would be appreciated
-PG