<?php
include('base.php');
if(isset($_SESSION['username']))
{
echo "Welcome! <br /><br />";
}
else
{
echo "Please <a href=\"index.php\">login</a>";
}
?>
<?php
$query = mysql_query("SELECT * FROM clans");
while($rows = mysql_fetch_array($query))
{
echo "<strong>Clan Name</strong>:<a href=\"clan_main.php?={$rows['clan']}\">" .$rows['clan'] ."</a>";
echo "<br />";
}
?>
<h1>Create Clan</h1>
<form action="clan_validate.php" method="post">
leader:<br />
<input type="text" readonly="readonly" name="leader" value="<?php echo $_SESSION['username'];?>"><br /><br />
clan:<br />
<input type="text" name="clan"><br /><br />
<input type="submit" value="submit">
</form>
Here's the page for each clan, but the problem is the data of each clan isn't viewing like i called it to view. Here is the error I am getting:
Quote
clan_main.php
<?php
include('base.php');
$clan = $_POST['clan'];
$query = mysql_query("SELECT * FROM clans WHERE clan = '".$clan."'");
while($row = mysql_fetch_array($query))
{
echo $row['clan'];
}
?>
I don't understand how my data is not set.. I have them in phpmyadmin... I'm a bit confused.
This post has been edited by dangmnx: 24 July 2011 - 09:02 PM

New Topic/Question
Reply




MultiQuote




|