I've managed to get resolve the problem above. Will report back soon, have to go to work!
I've used tables to make both of them and a few friends have opposed against them and they've highly recommend I start off with divs.
Looks good. Move on to next bit.I've created the main forum and the form as above.
Unfortunately that is the problem. I've been working 2 jobs and as one of them I've been running a family business in absence of my brother. In addition I have 2 other assignment and a further 2 exams. I've also had family over. So I'm really struggling to cope atm but I'm trying to do what I can. Hopefully I should get a large amount done over the next 7 days as I've planned my time wisely!If you have a month to do this and nothing else (i.e. work and other assignments) you should have it done in no time.
Am I correct in assuming tables and CSS don't work very well together?
Unfortunately that is the problem. I've been working 2 jobs and as one of them I've been running a family business in absence of my brother. In addition I have 2 other assignment and a further 2 exams. I've also had family over. So I'm really struggling to cope atm but I'm trying to do what I can. Hopefully I should get a large amount done over the next 7 days as I've planned my time wisely!
Yeah, you forgot to blank out those two Bookmarks Toolbar entries on the left hand firefox. I was expecting pr0n when I noticed the coverup. Imagine my surprise when they were perfectly innocuousI'll appreciate any feedback/criticism!
Remember to make sure you do this while writing the code. If you leave it till later it will never happen!Your code must be neatly formatted with proper indentation, meaningful variable, class and method.
// get value of id that sent from address bar
$id=$_GET['id'];
$sql="SELECT * FROM $tbl_name WHERE id='$id'";
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
?>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="1" bgcolor="#FFFFFF">
<tr>
// Insert reply
$sql2="INSERT INTO $tbl_name(reply_id, a_id, a_name, a_reply, a_datetime)VALUES('$id', '$Max_id', '$a_name', '$a_reply', '$datetime')";
$result2=mysql_query($sql2);
if($result2){
echo "Successful<BR>";
echo "<a href='view_thread.php?id=".$id."'>View your reply</a>";
// If added new reply, add value +1 in reply column
$tbl_name2="create_thread";
$sql3="UPDATE $tbl_name2 SET reply='$Max_id' WHERE id='$id'";
$result3=mysql_query($sql3);
}
else {
echo "ERROR";
}
mysql_close();
?>
$sql2 = "INSERT INTO '" . $tbl_name . "' ('reply_id', 'a_id', 'a_name', 'a_reply', 'a_datetime') VALUES ('" . $id . "', '" . $Max_id . "', '" . $a_name . "', '" . $a_reply . "', '" . $datetime . "')";
echo "ERROR: The SQL Server said:<br />" . mysql_error();
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''create_reply' ('reply_id', 'a_id', 'a_name', 'a_reply', 'a_date
ERROR: The SQL Server said:
Duplicate entry '1' for key 1