Jump to content

[SOLVED] PHP Script Page Displays White


perezf

Recommended Posts

I assume it may be because of how im calling the items from the db,

can someone help me figure out why i have just a blank screen,

i cant see any of the fields

 

<html>
<head><title>Update Clients</title></head>
<body>
<?php

include "dbconnect.inc.php";
$clientid = $_POST['updateclient'];

if(isset($_POST['updateuser'])) {

$clientid = $POST['clientid'];

$domain = $_POST['domain'];
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$fax = $_POST['fax'];
$address = $_POST['address'];
$company = $_POST['company'];
$hostingplan = $_POST['hostingplan'];
$maintenanceplan = $_POST['maintenanceplan'];
$ftpuser = $_POST['ftpuser'];
$ftppass = $_POST['ftppass'];


$clientinfo_update = "UPDATE `clientinfo` SET `domain` = '$domain',
`name` = '$name',
`email` = '$email',
`phone` = '$phone',
`fax` = '$fax',
`address` = '$address',
`company` = '$company' WHERE `id` = '$clientid' LIMIT 1";

$clientsupport_update = "UPDATE `clientsupport` SET `domain` = '$domain',
`hostingtype` = '$hostingplan',
`maintenancetype` = '$maintenanceplan' WHERE `id` = '$clientid' LIMIT 1";

$clientftp_update = "UPDATE `clientftp` SET `domain` = '$domain',
`ftpuser` = '$ftpuser',
`ftppass` = '$ftppass' WHERE `id` = '$clientid' LIMIT 1";
mysql_query($clientinfo_update) or die("Cannot Update from clientinfo");
mysql_query($clientsupport_update) or die("Cannot Update clientsupport");
mysql_query($clientftp_update) or die("Cannot Update clientftp");


        echo "Update Complete";

} else {

$clientinfo_update = "SELECT *  FROM clientinfo WHERE id = '$clientid'";
$clientsupport_update = "SELECT * FROM clientsupport WHERE id = '$clientid'";
$clientftp_update = "SELECT * FROM clientftp WHERE id = '$clientid'";

$result1 = mysql_query($clientinfo_update);
$result2 = mysql_query($clientsupport_update);
$result3 = mysql_query($clientftp_update);

$row1 = mysql_fetch_array($result1, MYSQL_ASSOC);
$row2 = mysql_fetch_array($result2, MYSQL_ASSOC);
$row3 = mysql_fetch_array($result3, MYSQL_ASSOC);

?>
        <p>*** <i>means the field is requried</i></p>
<form action="" method="post">
        <input type="hidden" name="clientid" value="<?php ehco $clientid; ?>" >
        <p>Domain Name: *** <i> (example: test.com )</i><br>
        <input type="text" name="domain" value="<?php echo $row1['domain']; ?>"></p>

        <p>Client Name: *** <i> (example: Frank Perez )</i><br>
        <input type="text" name="name" value="<?php echo $row1['name']; ?>"></p>

        <p>Email Address: *** <i>(example: [email protected] )</i><br>
        <input type="text" name="email" value="<?php echo $row1['email']; ?>"></p>

        <p>Phone Number: <i>(example: 954-560-8165 )</i><br>
        <input type="text" name="phone" value="<?php echo $row1['phone']; ?>"></p>

        <p>Fax Number: <i>(example: 954-252-6025 )</i><br>
        <input type="text" name="fax" value="<?php echo $row1['fax']; ?>"></p>
        <p>Client Address: <i>(example: 17040 SW 48th Street SW Ranches FL 33331 )</i><br>
        <textarea name="address" rows="5" cols="50"><?php echo $row1['address']; ?></textarea>

        <p>Company Name: <i>(example: Company Name )</i><br>
        <input type="text" name="company" value="<?php echo $row1['company']; ?>"></p>

        <p>On Hosting Plan:<br>
        <select name="hostingplan">
                <option selected><?php echo $row2['hostingtype']; ?></option>
                <option>None</option>
                <option>Beginners Plan</option>
                <option>Standard Plan</option>
                <option>Professional Plan</option>
        </select></p>

        <p>Maintenance Plan:<br>
        <select name="maintenanceplan">
                <option selected><?php echo $row2['maintenancetype']; ?></option>
                <option>None</option>
                <option>Starters Program</option>
                <option>Standard Program</option>
                <option>Professional Program</option>
        </select></p>

        <p>FTP Username:<br>
        <input type="text" name="ftpuser" value="<?php echo $row3['ftpuser']; ?>"></p>

        <p>Ftp Password:<br>
        <input type="text" name="ftppass" value="<?php echo $row3['ftppass']; ?>"></p>

        <p><input type="submit" name="updateuser" value="Update Client"></p>
</form>
<?php
        }
?>
</body>
</html>

???

Link to comment
https://forums.phpfreaks.com/topic/63148-solved-php-script-page-displays-white/
Share on other sites

solve an error before

 

<form action="" method="post">

        <input type="hidden" name="clientid" value="<?php ehco $clientid; ?>" >

 

------------------------------------

 

 

<form action="" method="post">

        <input type="hidden" name="clientid" value="<?php echo $clientid; ?>" >

 

How is this variable being given a value?

 

<input type="hidden" name="clientid" value="<?php echo $clientid; ?>" >

 

The $clientid is a hidden field which means no entry. In your update query you have WHERE id = $clientid but I don't see how that's populated with a value. If there's no info in the query it may be because it can't match the id with anything.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.