<?php
include_once 'resources/init.php';
if (isset ($_GET[id])) {
$q = "SELECT * FROM Client WHERE id = {$_GET[id]}";
$result = mysql_query($q);
$client = mysql_fetch_array($result);
}
?>
<a href="index.php">Back To List</a>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
First Name: <input type="text" name="firstname" value="<?php echo $client['firstname']; ?>" />
Last Name: <input type="text" name="lastname" value="<?php echo $client['lastname']; ?>" />
<br>
<br>
Email: <input type="text" name="email" value="<?php echo $client['email']; ?>" />
<br>
<br>
Invoice #:<input type="text" name="invoice" maxlength="5" size="5" value="<?php echo $client['invoice']; ?>" />
<br>
<br>
<br>
<br>
Windows Key:<input type="text" name="wink" maxlength="24" size="24" value="<?php echo $client['wink']; ?>" />
Windows Type:<input type="text" name="wint" maxlength="24" size="24" value="<?php echo $client['wint']; ?>" />
<br>
<br>
<br>
<br>
VIPRE Type:<input type="text" name="vtype" maxlength="3" size="3" value="<?php echo $client['vtype']; ?>" />
User Count:<input type="text" name="usera" maxlength="3" size="3" value="<?php echo $client['usera']; ?>" />
Year Count:<input type="text" name="yeara" maxlength="3" size="3" value="<?php echo $client['yeara']; ?>" />
<br>
<br>
Start Date:<input type="text" name="sdate" maxlength="10" size="10" value="<?php echo $client['sdate']; ?>" />
Expire Date:<input type="text" name="edate" maxlength="10" size="10" value="<?php echo $client['edate']; ?>" />
<br>
<br>
VIPRE Key: <input type="text" name="viprek" maxlength="24" size="24" value="<?php echo $client['viprek']; ?>" />
<br>
<br>
<br>
<input type="submit" name="submit" Value="Modify" />
</form>
<?php
if (isset($_POST["submit"])) {
$u = "UPDATE Client SET `firstname`='$_POST[firstname]', `lastname`='$_POST[lastname]', `email`='$_POST[email]', `invoice`='$_POST[invoice]', `wink`='$_POST[wink]', `wint`='$_POST[wint]', `vtype`='$_POST[vtype]', `usera`='$_POST[usera]', `yeara`='$_POST[yeara]', `sdate`='$_POST[sdate]', `edate`='$_POST[edate]', `viprek`='$_POST[viprek]' WHERE id = $_POST[id]";
mysql_query($u) or die (mysql_error());
header("Location: index.php");
}
?>
ARKaMAN 0 Light Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
ARKaMAN 0 Light Poster
Fest3er 39 Posting Whiz in Training
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
Fest3er 39 Posting Whiz in Training
ARKaMAN 0 Light Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
Fest3er 39 Posting Whiz in Training
diafol
ARKaMAN 0 Light Poster
Fest3er 39 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.