Jump to content

[SOLVED] Really Need Help


giraffemedia

Recommended Posts

My fault i was tired and messed up the code. Try now

 

<?php
error_reporting(E_ALL);	
//Start session
session_start();
//Check whether the session variable
//SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID'])=='')) {
header("location: library/access_denied.php");
exit();
}

include('../includes/config.php');
include('../includes/opendb.php');
$match_id = $_GET['id']
$query="SELECT * FROM matches WHERE match_id = '$match_id'";
$result=mysql_query($query)
$numrows=mysql_num_rows($result);
while($row=mysql_fetch_array($result))
{

$id = $row['id'];
$match_date = $row['match_date'];
}
echo $id;
echo $match_date;
?>

Link to comment
Share on other sites

<?php
error_reporting(E_ALL);	
//Start session
session_start();
//Check whether the session variable
//SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID'])=='')) {
header("location: library/access_denied.php");
exit();
}

include('../includes/config.php');
include('../includes/opendb.php');
$match_id = $_GET['id']
$query="SELECT * FROM matches WHERE match_id = '$match_id'";
$result=mysql_query($query)
$numrows=mysql_num_rows($result);
while($row=mysql_fetch_array($result))
{

$id = $row['id'];
$match_date = $row['match_date'];
}
echo $id;
echo $match_date;
?>

 

i edited the post above

Link to comment
Share on other sites

neither to i

 

<?php
error_reporting(E_ALL);	

include('../includes/config.php');
include('../includes/opendb.php');
$match_id = $_GET['id'];
$query="SELECT * FROM matches WHERE match_id = '$match_id'";
$result=mysql_query($query) or die('Error: ' . mysql_error());
while($row=mysql_fetch_array($result))
{

$id = $row['id'];
$match_date = $row['match_date'];
}
echo "id from the database".$id;
echo "match date from the database".$match_date;
echo "id from the URL".$match_id;
?>

 

what is the result form this

Link to comment
Share on other sites

id from the databasematch date from the database2008-05-17id from the URL3

 

My id column is called match_id. If I change

$id = $row['id'];

to

$id = $row['match_id'];

I get 'id from the database3match date from the database2008-05-17id from the URL3'

 

Looks like the id column has been missing the match_ bit

Link to comment
Share on other sites

edit now follow these steps

 

 

Now add in the rest of the feild from the database to the while loop folling this example

 

$this is your variable name = $row['add the feild names here'];

 

 

Then at the bottom echo the variable out with a <br>

echo $match_date;
echo "<br />";

 

 

 

 

 

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.