im wondering how i could change the page it posts to?
<? session_start();
include 'config.php';
$ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user
if(!isset($_SESSION['session_username']) || empty($_SESSION['session_username']) || $ip!= $_SESSION['session_ip']) {
//if the username is not set or the session username is empty or the ip does not match the session ip log them out
session_unset(); //clears firefox
session_destroy(); //clears IE
die("Hmm I Wonder Why You Have Ended Up Here :S"); }
include("online.php");?>
} elseif($_GET["action"] == "delete") {
$delete = mysql_query("TRUNCATE TABLE `shoutout`");
$session_username = $_SESSION["session_username"];
$add = mysql_query("INSERT INTO `shoutout` ( `comment` , `username` , `IP` ) VALUES ('DJ Says Is Not In Use By The Current DJ', 'Offline!', '192.168.1.1')");
echo "All shoutouts deleted";
} elseif($_GET["action"] == "addalert") {
$cookiename = time();
$ip = $_SERVER["REMOTE_ADDR"];
$message = addslashes($_POST["message"]);
$update = mysql_query("UPDATE `alert` SET `id`='1',`cookiename`='$cookiename',`message`='$me ssage' WHERE `id`='2'");
echo "The alert was successful. All the visitors of the website have now been shown the alert.<p>This window will automatically go back. Please wait...(this is usually about 15 seconds)";
echo "<meta http-equiv=\"refresh\" content=\"5;url=djsays.php?action=alertrefresh\">" ;
} elseif($_GET["action"] == "alertrefresh" and $_SESSION['session_level'] == "1") {
echo "Pending... Please Wait";
$delete = mysql_query("UPDATE `alert` SET `id`='2' WHERE `id`='1'");
echo "<meta http-equiv=\"refresh\" content=\"2;url=djsays.php?action=alert\">";
} elseif($_GET["action"] == "alert") {
echo "You can no longer use \n << Means u can only have 1 line
<form method='post' action='djsays.php?action=addalert'>
<table border=\"0\" cellspacing=\"5\">
<tr><td valign=\"top\"><font face=\"Verdana\" size=\"1\">Message:</td><td>
<textarea name=\"message\" rows=\"5\" cols=\"20\"></textarea></td></tr>
<tr><td></td><td><input type=\"submit\" name=\"submit\" value=\"Send Alert\"></td></tr>
</form>";
I think it must add it to mysql an then fetch it in says.php
19-12-2008, 02:10 PM
Habtopia
in phpmyadmin how would i copy an paste a table?
20-12-2008, 02:47 AM
Calon
Quote:
Originally Posted by Habtopia
in phpmyadmin how would i copy an paste a table?
phpMyAdmin is a web application, not a desktop application, so you would not "copy an paste" a table.
But I see what you want, so goto the table > export > Copy and paste the text it outputs after you have pressed Go/Submit. > then Click "SQL" and update the names for the new table > Then you're done.
You should stay away from phpMyAdmin if you don't know what you're doing, as you could easily ruin your database and lose your data.