-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodify.php
37 lines (31 loc) · 911 Bytes
/
modify.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
session_start();
if($_SESSION['authuser']!=1)
{
echo"ACCESS DENIED";
exit();
}
$connect = mysql_connect("localhost","root","") or die ("check your server connection.");
mysql_select_db("2008b4a5723p");
$info=$_POST['info'];
$value=$_POST['value'];
$add = "ALTER TABLE members ADD `$info` VARCHAR(25)";
$query = mysql_query($add)or die(mysql_error());
$query2 = mysql_query("INSERT INTO members ('$info') VALUES ('$value')");
echo("Record Added Sucessfully");
?>
<form method="post" action="default.php">
<input type="submit" class="myButton" name="wel" value="click here to go to login page">
</form>
<footer>
<a href="default.aspx" style="color: white;">Back to home</a>
© 2013 Gaikwad Company, Inc. Course Registration System
</footer>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="div1"></div>
</body>
</html>