ok im writing a cms system and i have a page that lets you edit the config file problem is it not getting the variable $scmspms from the form?:
the offending line in config_edit.php:
<br> Private Messages Table Name:<br>
<input name='prims' value='$table4' type='text'>(Leave as default (scms_pms) unless you know what you are doing)<br>
config_edit.php3
<?php
session_start();
$id = $_REQUEST['id'];
$scmsserver = $_POST['server'];
$scmsdbname = $_POST['dbname'];
$scmsdbuser = $_POST['dbuser'];
$scmsdbpass = $_POST['dbpass'];
$scmssitename = $_POST['site_name'];
$scmscontent = $_POST['content'];
$scmsmenus = $_POST['menus'];
$scmsusers = $_POST['users'];
$scmspms = $_POST['prims'];
$scmsfolder = $_POST['folder'];
$scmswebaddy = $_POST['webaddy'];
if ($_SESSION['usrlvl'] == 1)
{
echo $scmspms;
$input = '<?php
###############################################
## config.php3 #
## Author: Daniel Hill #
## Created: 1/3/06 #
## All code contained is this file is #
## Copyright Daniel Hill 2006 and must not be #
## edited or redistrubuted without permission #
## from the author #
###############################################
$server = "$scmsserver";
$db = "$scmsdbname";
$user = "$scmsdbuser";
$pass = "$scmsdbpass";
$site_name = "$scmssitename";
$table1 = "$scmscontent";
$table2 = "$scmsmenus";
$table3 = "$scmsusers";
$table4 = "$scmspms";
$folder = "$scmsfolder";
$webaddress = "$scmswebaddy";
?>';
//open the file and choose the mode
$fh = fopen("../config.php3", "w");
fwrite($fh, $input);
//close the file
fclose($fh);
echo "$input";
}
else
{
echo "<fnt color='red'><b>Sorry But It Appears That You Are Not Of A User Level With Sufficient Privelidges To Access This Page Or You Aren't Logged In!!</b></font>";
exit();
}
?>
the variable is completely empty