Hi I've some problems with my code.
The code without the if/else (and mysql thinie) works fine.
Can someone tell me what i am doing wrong?
Thx
<?php
if ($_GET['submit'] == 1) {
$link = mysql_connect("localhost:8889", "root", "root");
mysql_select_db("huntsclub");
$query = "INSERT INTO pp VALUES('', '".$_POST['page']."')";
$result = mysql_query($query);
} else {
if (!ereg('/$', $HTTP_SERVER_VARS['DOCUMENT_ROOT']))
$_root = $HTTP_SERVER_VARS['DOCUMENT_ROOT'].'/';
else
$_root = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
define('DR', $_root);
unset($_root);
$spaw_root = DR.'spaw/';
include $spaw_root.'spaw_control.class.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>
<head>
<title>test Fabriquez votre page personnelle !</title>
</head>
<body>
<form method="post" action="pp.php?submit=1">
<?php
$sw = new SPAW_Wysiwyg('page' /*name*/,stripslashes($HTTP_POST_VARS['page'])/*value*/,'fr' /*language*/,'full' /*toolbar mode*/,'default' /*theme*/,'100%' /*width*/,'95%'/*height*/);
$sw->show();
?>
<input type="submit">
</form>
</body>
</html>
<?php
}
?>