PK

ADDRLIN : /home/anibklip/adhocacademy.com/admin/feedback/
FLL :
Current File : /home/anibklip/adhocacademy.com/admin/feedback/feedback.php

<?php
	include_once('../../include/common.php');
	include_once('../../include/connection.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>feedback</title>
<script language="javascript">
	function emptyfield() {
		//alert("dudfsufdysui");
		var name = document.getElementById("name");
		var address = document.getElementById("address");
		var city = document.getElementById("city");
		var pinCode = document.getElementById("pinCode");
		var phone = document.getElementById("phone");
		var email = document.getElementById("email");
		var feed = document.getElementById("feed");
		var suggestion = document.getElementById("suggestion");
	
		if(name.value=='')
		{
			alert("Enter your Name");
			name.focus();
			return false;
		}
		if(address.value=='')
		{
			alert("Enter your Adderss");
			address.focus();
			return false;
		}
		if(city.value=='')
		{
			alert("Enter your City");
			city.focus();
			return false;
		}

		if(pinCode.value=='')
		{
			alert("Enter your Pin Code");
			pinCode.focus();
			return false;
		}
		
		if(phone.value=='')
		{
			alert("Enter your Phone");
			phone.focus();
			return false;
		}
		
		if(email.value=='')
		{
			alert("Enter your E-Mail");
			email.focus();
			return false;
		}
		if(feed.value=='')
		{
			alert("Enter your Feedback");
			feed.focus();
			return false;
		}
		if(suggestion.value=='')
		{
			alert("Enter your Suggestion/Enquiry");
			suggestion.focus();
			return false;
		}
	}
</script>

</head>

<body>

<table border="0px" width="100%" cellpadding="0" cellspacing="0">
    <tr>
		<td colspan="3"><?php include_once('../../include/adminheader.php'); ?></td>    
    </tr>
<?php 
	$action='add';
	if($_GET['action']=='edit') {
		echo $selectForFeedBack="SELECT * FROM enquiry WHERE eId='".$_GET['eId']."'";
		$queryForFeedBack=mysql_query($selectForFeedBack);
		$fetchForFeedBack=mysql_fetch_array($queryForFeedBack);
		$action='edit';
	}
?>
    <tr>
    	<td width="25%">&nbsp; Left</td>
		<td width="50%">
        <form name="feedback" action="feed_action.php" method="post">
        	<table border="0px" width="100%" cellpadding="0" cellspacing="5">
                <tr>
                	<th>Student Enquery</th>
                    <td width="20px">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                	<td>Select Course</td>
                    <td width="20px">:</td>
                    <td><select name="course" style="width:183px;">
                    	<option value=""></option>
                    </select></td>
                </tr>
            	<tr>
                	<td>Name</td>
                    <td width="20px">:</td>
                    <td><input type="text" name="name" id="name" style="width:178px;" value="<?=$fetchForFeedBack['name']; ?>" /></td>
                </tr>
                <tr>
                	<td>Address</td>
                    <td width="20px">:</td>
                    <td><textarea name="address" id="address"><?=$fetchForFeedBack['address']; ?></textarea></td>
                </tr>
                <tr>
                	<td>City</td>
                    <td width="20px">:</td>
                    <td><input type="text" name="city" id="city" style="width:178px;" value="<?=$fetchForFeedBack['city']; ?>" /></td>
                </tr>
                <tr>
                	<td>Pin Code.</td>
                    <td width="20px">:</td>
                    <td><input type="text" name="pinCode" id="pinCode" style="width:178px;" value="<?=$fetchForFeedBack['pinCode']; ?>" /></td>
                </tr>
                <tr>
                	<td>Phone No.</td>
                    <td width="20px">:</td>
                    <td><input type="text" name="phone" id="phone" style="width:178px;" value="<?=$fetchForFeedBack['phone']; ?>" /></td>
                </tr>
                <tr>
                	<td>E-mail</td>
                    <td width="20px">:</td>
                    <td><input type="text" name="email" id="email" style="width:178px;" value="<?=$fetchForFeedBack['email']; ?>" /></td>
                </tr>
                <tr>
                	<td>How did you get hare ?</td>
                    <td width="20px">:</td>
                    <td><textarea name="feed" id="feed"><?=$fetchForFeedBack['feed']; ?></textarea></td>
                </tr>
                <tr>
                	<td>Feedback / Suggestion</td>
                    <td width="20px">:</td>
                    <td><textarea name="suggestion" id="suggestion"><?=$fetchForFeedBack['suggestion']; ?></textarea></td>
                </tr>
                <tr>
                	<td><input type="hidden" name="action" value="<?php echo $action; ?>" />
                    	<input type="hidden" name="eId" value="<?=$fetchForFeedBack['eId']; ?>" /></td>
                    <td align="center" colspan="2"><input type="submit" name="submit"  onclick="return emptyfield();" value="Submit" /></td>
                </tr>
            </table>
            </form>
        </td>
        <td width="25%">&nbsp; Right</td>    
    </tr>
    <tr>
		<td colspan="3"><?php include_once('../../include/adminfooter.php'); ?></td>    
    </tr>
</table>
</body>
</html>


PK 99