Hi im having problems with this script I keep getting different errors, Im to get the board name from createboard in the session, then it goes to createboard2 where the session opnes again and it transfers the data to insert the values into the sql tbale then the session is closed, any help is greatfully appreciated ?
[code=php]
<?php
} else if ($action == “createboard”) {
session_start();
session_register($name);
$name = $post[‘boardname’];
?>
<table width=92% cellspacing=1 border=0 align=center bgcolor=005177 cellpadding=4>
<tr>
<td class=catbg>
Simple Forums :: Admin :: Create A Board
</td>
</tr>
<tr>
<td class=windowbg>
<form method=post name=createboard action=index.php?action=createboard2>
Board Name:
<br/><input type=text id=boardname>
<p><input type=submit value=Submit name=submit id=submit>
</form>
</td>
</table>
<?php
} else if ($action == “createboard2”) {
session_start();
$user = “shoutbox_admin”;
$host = “localhost”;
$password = “admin”;
$database = “shoutbox_simple”;
$connection = mysql_connect($host,$user,$password)
$db = mysql_select_db($database,$connection)
$sql = ‘INSERT INTO `boards` ( `id` , `name` , `topics` , `posts` , `lastreply` ) ‘;
$sql .= ‘VALUES ( “”, “$name”, “0”, “0”, “N/A” );’;
$sql .= ”;
$result = mysql_query($sql);
session_end();
} else {
?>
Luke ?