Can someone please help and tell me what I am doing wrong.

<title>FRHG Guest Wireless Account Creation or Deletion</title>

<h1 align= "center">Fremont-Rideout Health Group</h1>
<h1 align= "center">Guest Wireless</h1><br /><br /><br />

<form method= 'post' action= '<?php echo $PHP_SELF;?>' id='form' accept-charset='UTF-8'>
<legend>Account Creation/Deletion</legend><br /><br />
<label for='uname' >Username: </label>
<input type='text' size='30' maxlength='30' name='uname'><br /><br />
<label for='pword' >Password: </label>
<input type='password' size='30' maxlength='30' name='pword'><br /><br />
<input type='radio' name='create' value='creation' />Create
<input type='radio' name='create' value='deletion' />Delete<br /><br />
<input type='submit' name="submit" value='Submit' /><br /><br />
<h5>*For Deleting feature, do not input Password</h5>

/*$uname = $_POST['uname'];
$pword = $_POST['pword'];
$create = $_POST['creation'];
$delete = $_POST['deletion'];*/


if($_POST['create'] == 'creation')
        echo -e ,"{$_POST['uname']} /n{$_POST['pword']}" > WifiGuestCreate/"{$_POST['uname']}";
elseif($_POST['create'] == 'deletion')
        echo -e ,"{$_POST['uname']}" > WifiGuestDelete/"{$_POST['uname']}";
    echo "<p>Please select Create or Delete</p>";


Recommended Answers

All 3 Replies

I dont find any parse error in your code. What message you getting when you run this script.

ONe thing I see in line number 10, is its not $PHP_SELF rather its $_SERVER['PHP_SELF'];

Not sure if this would be causing your problem but <?php echo $PHP_SELF;?> should be <?php echo $_SERVER['PHP_SELF'];?>

Honestly it just gives me parse error with no details. Before it told me parse error and I put comma after my echos and it went away. Thanks for the look guys I appreciate it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.