Code: Select all
<?php
include ("../config/settingsload.php");
include ("../config/config.php");
include ("../config/message.php");
$shostname = $_POST["shostname"];
$link = mysql_connect("$host","$username","$password");
mysql_select_db($database,$link);
$result = mysql_query("SELECT * FROM hosts WHERE hostname = '$shostname'");
$row = mysql_fetch_array($result);
$hostname = $row[0];
$cobranded = $row[35];
$oldhostname = $hostname;
$hosturl = $row[1];
$space = $row[2];
$bandwidth = $row[3];
$filesizelimit = $row[4];
$upload = $row[5];
$forcedads = $row[6];
$interests = $row[7];
$yourads = $row[8];
$dbs = $row[9];
$yoururl = $row[10];
$backups = $row[11];
$inactivitylimit = $row[12];
$additional = $row[13];
$cronjobs = $row[14];
$multipleaccounts = $row[15];
$statistics = $row[16];
$ssl = $row[17];
$realaudio = $row[18];
$realvideo = $row[19];
$htaccess = $row[20];
$passwordprotectedfiles = $row[21];
$customerrorpages = $row[22];
$pop3 = $row[23];
$webmail = $row[24];
$forwarding = $row[25];
$frontpagextensions = $row[26];
$cgiperl = $row[27];
$asp = $row[28];
$php = $row[29];
$ssi = $row[30];
$isml = $row[31];
$cpp = $row[32];
$python = $row[33];
$java = $row[34];
?>
...
<tr><td width="160" class="text" valign="top">Scripting:</td><td class="text">
<input type="checkbox" <?php if ($frontpagextensions == 'yes') echo 'checked="checked"' ?> name="frontpagextensions" value="yes" class="text">FrontPage Extensions<br />
<input type="checkbox" <?php if ($cgiperl == 'yes') echo 'checked="checked"' ?> name="cgiperl" value="yes" class="text">CGI / PERL<br />
<input type="checkbox" <?php if ($asp == 'yes') echo 'checked="checked"' ?> name="asp" value="yes" class="text">ASP<br />
<input type="checkbox" <?php if ($php == 'yes') echo 'checked="checked"' ?> name="php" value="yes" class="text">PHP<br />
<input type="checkbox" <?php if ($ssi == 'yes') echo 'checked="checked"' ?> name="ssi" value="yes" class="text">SSI<br />
<input type="checkbox" <?php if ($isml == 'yes') echo 'checked="checked"' ?> name="isml" value="yes" class="text">ISML<br />
<input type="checkbox" <?php if ($cpp == 'yes') echo 'checked="checked"' ?> name="cpp" value="yes" class="text">C / C++<br />
<input type="checkbox" <?php if ($python == 'yes') echo 'checked="checked"' ?> name="python" value="yes" class="text">Python<br />
<input type="checkbox" <?php if ($java == 'yes') echo 'checked="checked"' ?> name="java" value="yes" class="text">Java<br />
</td></tr> ...Code: Select all
$frontpagextensions = $_POST['frontpagextensions'];
$cgiperl = $_POST['cgiperl'];
$asp = $_POST['asp'];
$php = $_POST['php'];
$ssi = $_POST['ssi'];
$isml = $_POST['isml'];
$cpp = $_POST['cpp'];
$python = $_POST['python'];
$java = $_POST['java'];
$hosturl = $_POST['hosturl'];
$link = mysql_connect("$host","$username","$password") or die("Error: Could not connect to $host using $username and $password");
mysql_select_db("$database") or die("Error: Could not select database $database! ".mysql_error());
mysql_query("UPDATE hosts SET
hostname = '$hostname',
hosturl = '$hosturl',
space = '$space',
bandwidth = '$bandwidth',
filesizelimit = '$filesizelimit',
upload = '$upload',
forcedads = '$forcedads',
interests = '$interests',
yourads = '$yourads',
dbs = '$dbs',
yoururl = '$yoururl',
backups = '$backups',
inactivitylimit = '$inactivitylimit',
additional = '$additional',
cronjobs = '$cronjobs',
multipleaccounts = '$multipleaccounts',
statistics = '$statistics',
sslsupport = '$ssl',
realaudio = '$realaudio',
realvideo = '$realvideo',
htaccess = '$htaccess',
passwordprotectedfiles = '$passwordprotectedfiles',
customerrorpages = '$customerrorpages',
popthree = '$pop3',
webmail = '$webmail',
forwarding = '$forwarding',
frontpagextensions = '$frontpagextensions',
cgiperl = '$cgiperl',
aspsupport = '$asp',
phpsupport = '$php',
ssisupport = '$ssi',
ismlsupport = '$isml',
cppsupport = '$cpp',
pythonsupport = '$python',
javasupport = '$java',
cobranded = '$cobranded' WHERE hostname = '$oldhostname'") or die("Could not update hosts! ".mysql_error());PROBLEM: FIRST.HTML IS THE FORM WITH CHECKBOXES. SECOND.PHP SHOWS THE CHECKBOX VALUES (IS CHECKED OR NOT) AND SENDS IT AGAIN TO THIRD.PHP, BUT THIRD.PHP DOES NOT SHOW THE CHECKBOX VALUES RIGHT ANYMORE. WHAT'S THE PROBLEM?
I can submit checkbox values right but if I submit then through two pages I can't ?