Using PWN To Write To MySQL DB
#1

I was hoping someone would be able to create me a script that would write information (bans) to a MySQL Database. I currently have this PHP script that retrieves the information and would like the PWN script to automatically put the ban in the separate rows of the database if someone is banned (/adban id reason). (Also, is it possible to put a date/time when the person was banned, if so, could you add that in as well?) Thanks in advance! Here is the PHP script, so you guys have the rows/w/e:

Код:
<?php
mysql_connect("secret_database", "secret_user", "secret_password") or die(mysql_error());
echo "Connected to MySQL<br /><hr />";
mysql_select_db("secret_database") or die(mysql_error());
echo "Connected to Database<br /><hr />";
$query = "SELECT * FROM bans";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
	echo "<b>Name: </b>" . $row['Name'] . "<b> - Reason: </b>" . $row['Reason'] . "<b> - Admin: </b>" . $row['Admin'] . "<b> - IP: </b>" . $row['IP'] . "<b> - Date: </b>" . $row['Date'];
	echo "<br />";
	}
?>
Reply
#2

Also, each of the different strings of the thing would have to be like separate in separate fields. Just to clarify that.
Reply
#3

So basically if you can't script in PHP, I need a pwn MySQL script that stores bans in the rows: Name, Reason, Admin (Who banned them), IP, Time when banned. Hope this helps!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)