Jump to content

Please Help - Urgently :(:(


AnyoneThere

Recommended Posts

Hi Guys,

 

I am a bit of a PHP noob and I am hoping for a bit of help.

My deadline to have this working is tomorrow.

 

Basically I want to display a table which shows all the events I have signed upto.

However, my code is creating windows within itself and separate tables which are all over the place.

 

Here is my code:

 

<?php
session_start();
$email = $_SESSION['email'];

include '../dbconn.php';
include '../includes/functions2.php';

$query2  = "SELECT * FROM billing where email='$email'";
$result2 = mysql_query($query2);
$num_rows = mysql_num_rows($result2);

while($row2 = mysql_fetch_array($result2, MYSQL_ASSOC))
{

$query3  = "SELECT * FROM events where id='$row2[eventid]'";
$result3 = mysql_query($query3);

while($row3 = mysql_fetch_array($result3, MYSQL_ASSOC))
{

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link rel="shortcut icon" href="../images/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1" />

<meta name="keywords" content="Ghost Hunts, Ghost Hunting, Ghost Hunt Suppers, Overnight Ghost Hunt, Haunted Nights, Ghost Hunting Weekends, Paranormal Events, Most Haunted Tours, Most Haunted, Haunted Places, Anyone There?, Fright Nights, Haunted Happenings, Haunted Gatherings, The Hoff, Scott Mills, Yvette Fielding" />

<meta name="description" content="
    Paranormal team, organising ghost hunts accross the UK. With many famous guests, only at Anyone There?" 
/>


<link href="style.css" rel="stylesheet" type="text/css" />
<title>Anyone There :. Haunted Experiences</title>
</head>
<script LANGUAGE="JavaScript" SRC="overlib.js"></script>
<body>
<div id="container">
<div id="header">


</div>
<div id="nav">
	<ul>
		<li><a href="cprotected.php" class="selected" title="Events">My Events</a></li>
		<li><a href="feedback.php">Feedback</a></li>
		<li><a href="index.php">Logout</a></li>	
</ul>
</div>
<div id="content">
	<div id="page">
		<h2><?php echo "Welcome $row1[fname] $row1[sname]"; ?></h2>
<br>
<h2>
<?php echo "Showing $num_rows events. . ."; ?>
</h2>
<center>
<p>
<?php

$deposit=$row2[quantity]*10;
$total=$row2[quantity]*$row2[ticketprice];

$cancel='http://www.anyonethere.co.uk/main/cprotected.php';
$paid='http://www.anyonethere.co.uk/main/paid.php';

echo "
<center>
<table width='800' class='reference'>
<tr>
<th>Venue</th>
<th>Date</th>
<th>Total Price</th>
<th>Deposit</th>
<th>Remaining</th>
<th>Ticket Quantity</th>
<th>Status</th>
</tr>
";

if ($row2[status]=='0')
{
echo "<tr>";
echo "<td>$row3[venue]</td> ";
echo "<td>$row3[date]</td> ";
echo "<td>£$total</td> ";
echo "<td>£$deposit</td> ";
echo "<td>£$row2[owe]</td> ";
echo "<td>$row2[quantity]</td> ";
echo "<td>Pay Deposit</td></tr>";

}
elseif ($row2[status]=='1')
{

echo "<td>$row3[venue]</td> ";
echo "<td>$row3[date]</td> ";
echo "<td>£$total</td> ";
echo "<td>£$deposit</td> ";
echo "<td>£$row2[owe]</td> ";
echo "<td>$row2[quantity]</td> ";
echo "<td bgcolor='orange'>PAY OUTSTANDING BALANCE</td></tr>";

}
elseif ($row2[status]=='2')
{

echo "<td>$row3[venue]</td> ";
echo "<td>$row3[date]</td> ";
echo "<td>£$total</td> ";
echo "<td>£$deposit</td> ";
echo "<td>£$row2[owe]</td> ";
echo "<td>$row2[quantity]</td> ";
echo "<td bgcolor='green'>Paid</td></tr>";

}}}
echo "</table>";
?>
</p>
				</div>
			<div class="clear"></div>
</div>
<div id="footer">
	<p>© 2011 Anyone There: The UK's #1 for Haunted Events</p>
</div>

</div>
</body>
</html>

 

Please can somebody give me a pointer in the right direction, it will be a life saver? Thanks in Advance, Dan

Link to comment
Share on other sites

Users should not "bump" topics that are still on the first page of the forums. If you bump, you must provide additional information. If you resort to bumping, chances are your question needs to be re-thought and re-described (see Eric Raymond's "How To Ask Questions The Smart Way").

 

Users will not mark their post as being "URGENT" by either making the post ALL CAPS or adding any hint that they need it done Quick or ASAP. All posts are treated equal, your post is no more important than any other user's post on this forum. If it is "URGENT" pay someone to do it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.