Jump to content

Data only refreshes on my computer but not others! Help!


soccerrprp1

Recommended Posts

Hi all,

 

I've created a data-entry HTML page that posts to update.php. I am using mysql to store the data entered. When I enter data and hit "update database" button, the php file pops up and correctly shows the data entered, but the update.php file does not show that same data on another computer. I have checked the mysql database and it clearly shows that it the new data has been stored. Why isn't the data showing up on any other computer?

 

I can provide codes as needed.

 

Thanks.

 

Richard

Link to comment
Share on other sites

php will not automaticly update a remote webpage without being refreshed. It will show the file as it was when you last requested it, until you request it again (refresh) only then will it show the updated information.

 

What you are thinking would require ajax. Basically you need to create a settimeout on each page to check for new databsse info using ajax, however i think this is beyond your current ability.

Link to comment
Share on other sites

hey guys, thanks

 

refreshing page does not update data. ajax is my next step and pretty certain i'll be able to get what i need from it.

 

i have my code below.

 

here is my code for php:

 

 

<?php # BEGINNING OF PHP!

$gsteam= $_POST["gsteam"];
$gsteam1= $_POST["gsteam1"];
$gsstatus= $_POST["gsstatus"];
$gsscore= $_POST["gsscore"];
$gsscore1= $_POST["gsscore1"];

$bteam= $_POST["bteam"];
$bteam1= $_POST["bteam1"];
$bstatus= $_POST["bstatus"];
$bscore= $_POST["bscore"];
$bscore1= $_POST["bscore1"];

$s1team= $_POST["s1team"];
$s1team1= $_POST["s1team1"];
$s1status= $_POST["s1status"];
$s1score= $_POST["s1score"];
$s1score1= $_POST["s1score1"];

$s2team= $_POST["s2team"];
$s2team1= $_POST["s2team1"];
$s2status= $_POST["s2status"];
$s2score= $_POST["s2score"];
$s2score1= $_POST["s2score1"];

$gteam= $_POST["gteam"];
$gteam1= $_POST["gteam1"];
$gstatus= $_POST["gstatus"];
$gscore= $_POST["gscore"];
$gscore1= $_POST["gscore1"];

$username = ""hostname";
$password = "username";
$hostname = "localhost"; 

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password) 
or die("Unable to connect to MySQL" .mysql_error());
echo "Connected to MySQL<br>";

//select a database to work with
$selected = mysql_select_db("littleti_droid",$dbhandle) 
  or die("Could not select examples" .mysql_error());
  
   
//insert data from php web page

$query="INSERT INTO stats (gsteam, gsteam1, gsstatus, gsscore, gsscore1, bteam, bteam1, bstatus, bscore, bscore1, s1team, s1team1, s1status, s1score, s1score1, s2team, s2team1, s2status, s2score, s2score1, gteam, gteam1, gstatus, gscore, gscore1) VALUES ('".$gsteam."','".$gsteam1."','".$gsstatus."','".$gsscore."','".$gsscore1."','".$bteam."','".$bteam1."','".$bstatus."','".$bscore."','".$bscore1."','".$s1team."','".$s1team1."','".$s1status."','".$s1score."','".$s1score1."','".$s2team."','".$s2team1."','".$s2status."','".$s2score."','".$s2score1."','".$gteam."','".$gteam1."','".$gstatus."','".$gscore."','".$gscore1."')";

$result = mysql_query($query) or die(mysql_error());

//fetch tha data from the database  

echo "[V]Team: " .$gsteam."  ".$gsscore."                              Status: ".$gsstatus. "<br>";// input from web based
echo "[H]Team: " .$gsteam1."  ".$gsscore1."<br><br>";// input from web based

echo "[V]Team: " .$bteam."  ".$bscore."                              Status: ".$bstatus. "<br>";// input from web based
echo "[H]Team: " .$bteam1."  ".$bscore1."<br><br>";// input from web based

echo "[V]Team: " .$s1team."  ".$s1score."                              Status: ".$s1status. "<br>";// input from web based
echo "[H]Team: " .$s1team1."  ".$s1score1."<br><br>";// input from web based

echo "[V]Team: " .$s2team."  ".$s2score."                              Status: ".$s2status. "<br>";// input from web based
echo "[H]Team: " .$s2team1."  ".$s2score1."<br><br>";// input from web based

echo "[V]Team: " .$gteam."  ".$gscore."                              Status: ".$gstatus. "<br>";// input from web based
echo "[H]Team: " .$gteam1."  ".$gscore1."<br><br>";// input from web based


//close the connection
mysql_close($dbhandle);
?>

 

here is my data entry code:

 

 

<body> 

<form method="post" action="update.php"> 
<!--Gloria H. Snyder Stadium --> 
<b>Gloria H. Snyder Stadium</b> 
<br/> 
V:
<input type="text" name="gsteam" size="30" />  
<input type="text" name="gsscore" size="2" /> 
Status:
<input type="text" name="gsstatus" size="10" /> 
<br/> 
H:
<input type="text" name="gsteam1" size="30" /> 
<input type="text" name="gsscore1" size="2" /> 
<input type="submit" value="Update Database" /> 

</form> 

<form method="post" action="update.php"> 
<!--Baseball Stadium --> 
<b>Baseball Stadium</b> 
<br/> 

V:
<input type="text" name="bteam" size="30" />  
<input type="text" name="bscore" size="2" /> 
Status:
<input type="text" name="bstatus" size="10" /> 
<br/> 
H:
<input type="text" name="bteam1" size="30" /> 
<input type="text" name="bscore1" size="2" /> 
<input type="submit" value="Update Database" /> 
</form> 

<form method="post" action="update.php"> 
<!--Softball 1 --> 
<b>Softball Field I</b> 
<br/> 

V:
<input type="text" name="s1team" size="30" />  
<input type="text" name="s1score" size="2" /> 
Status:
<input type="text" name="s1status" size="10" /> 
<br/> 
H:
<input type="text" name="s1team1" size="30" /> 
<input type="text" name="s1score1" size="2" /> 
<input type="submit" value="Update Database" /> 
</form> 

<form method="post" action="update.php"> 
<!--Softball 2 --> 
<b>Softball Field II</b> 
<br/> 

V:
<input type="text" name="s2team" size="30" />  
<input type="text" name="s2score" size="2" /> 
Status:
<input type="text" name="s2status" size="10" /> 
<br/> 
H:
<input type="text" name="s2team1" size="30" /> 
<input type="text" name="s2score1" size="2" /> 
<input type="submit" value="Update Database" /> 
</form> 

<form method="post" action="update.php"> 
<!--Gymnasium --> 
<b>Gymnasium</b> 
<br/> 

V:
<input type="text" name="gteam" size="30" />  
<input type="text" name="gscore" size="2" /> 
Status:
<input type="text" name="gstatus" size="10" /> 
<br/> 
H:
<input type="text" name="gteam1" size="30" /> 
<input type="text" name="gscore1" size="2" /> 
<input type="submit" value="Update Database" /> 

</form> 

</body> 

 

 

MOD EDIT:

 . . . 

tags added. ~P2k

Link to comment
Share on other sites

hey guys, thanks

 

refreshing page does not update data. ajax is my next step and pretty certain i'll be able to get what i need from it.

 

i have my code below.

 

here is my code for php:

 

<?php # BEGINNING OF PHP!

 

$gsteam= $_POST["gsteam"];

$gsteam1= $_POST["gsteam1"];

$gsstatus= $_POST["gsstatus"];

$gsscore= $_POST["gsscore"];

$gsscore1= $_POST["gsscore1"];

 

$bteam= $_POST["bteam"];

$bteam1= $_POST["bteam1"];

$bstatus= $_POST["bstatus"];

$bscore= $_POST["bscore"];

$bscore1= $_POST["bscore1"];

 

$s1team= $_POST["s1team"];

$s1team1= $_POST["s1team1"];

$s1status= $_POST["s1status"];

$s1score= $_POST["s1score"];

$s1score1= $_POST["s1score1"];

 

$s2team= $_POST["s2team"];

$s2team1= $_POST["s2team1"];

$s2status= $_POST["s2status"];

$s2score= $_POST["s2score"];

$s2score1= $_POST["s2score1"];

 

$gteam= $_POST["gteam"];

$gteam1= $_POST["gteam1"];

$gstatus= $_POST["gstatus"];

$gscore= $_POST["gscore"];

$gscore1= $_POST["gscore1"];

 

$username = ""hostname";

$password = "username";

$hostname = "localhost";

 

//connection to the database

$dbhandle = mysql_connect($hostname, $username, $password)

or die("Unable to connect to MySQL" .mysql_error());

echo "Connected to MySQL<br>";

 

//select a database to work with

$selected = mysql_select_db("littleti_droid",$dbhandle)

  or die("Could not select examples" .mysql_error());

 

 

//insert data from php web page

 

$query="INSERT INTO stats (gsteam, gsteam1, gsstatus, gsscore, gsscore1, bteam, bteam1, bstatus, bscore, bscore1, s1team, s1team1, s1status, s1score, s1score1, s2team, s2team1, s2status, s2score, s2score1, gteam, gteam1, gstatus, gscore, gscore1) VALUES ('".$gsteam."','".$gsteam1."','".$gsstatus."','".$gsscore."','".$gsscore1."','".$bteam."','".$bteam1."','".$bstatus."','".$bscore."','".$bscore1."','".$s1team."','".$s1team1."','".$s1status."','".$s1score."','".$s1score1."','".$s2team."','".$s2team1."','".$s2status."','".$s2score."','".$s2score1."','".$gteam."','".$gteam1."','".$gstatus."','".$gscore."','".$gscore1."')";

 

$result = mysql_query($query) or die(mysql_error());

 

//fetch tha data from the database 

 

echo "[V]Team: " .$gsteam."  ".$gsscore."                              Status: ".$gsstatus. "<br>";// input from web based

echo "[H]Team: " .$gsteam1."  ".$gsscore1."<br><br>";// input from web based

 

echo "[V]Team: " .$bteam."  ".$bscore."                              Status: ".$bstatus. "<br>";// input from web based

echo "[H]Team: " .$bteam1."  ".$bscore1."<br><br>";// input from web based

 

echo "[V]Team: " .$s1team."  ".$s1score."                              Status: ".$s1status. "<br>";// input from web based

echo "[H]Team: " .$s1team1."  ".$s1score1."<br><br>";// input from web based

 

echo "[V]Team: " .$s2team."  ".$s2score."                              Status: ".$s2status. "<br>";// input from web based

echo "[H]Team: " .$s2team1."  ".$s2score1."<br><br>";// input from web based

 

echo "[V]Team: " .$gteam."  ".$gscore."                              Status: ".$gstatus. "<br>";// input from web based

echo "[H]Team: " .$gteam1."  ".$gscore1."<br><br>";// input from web based

 

 

//close the connection

mysql_close($dbhandle);

?>

 

here is my data entry code:

 

<body>

 

<form method="post" action="update.php">

<!--Gloria H. Snyder Stadium -->

<b>Gloria H. Snyder Stadium</b>

<br/>

V:

<input type="text" name="gsteam" size="30" /> 

<input type="text" name="gsscore" size="2" />

Status:

<input type="text" name="gsstatus" size="10" />

<br/>

H:

<input type="text" name="gsteam1" size="30" />

<input type="text" name="gsscore1" size="2" />

<input type="submit" value="Update Database" />

 

</form>

 

<form method="post" action="update.php">

<!--Baseball Stadium -->

<b>Baseball Stadium</b>

<br/>

 

V:

<input type="text" name="bteam" size="30" /> 

<input type="text" name="bscore" size="2" />

Status:

<input type="text" name="bstatus" size="10" />

<br/>

H:

<input type="text" name="bteam1" size="30" />

<input type="text" name="bscore1" size="2" />

<input type="submit" value="Update Database" />

</form>

 

<form method="post" action="update.php">

<!--Softball 1 -->

<b>Softball Field I</b>

<br/>

 

V:

<input type="text" name="s1team" size="30" /> 

<input type="text" name="s1score" size="2" />

Status:

<input type="text" name="s1status" size="10" />

<br/>

H:

<input type="text" name="s1team1" size="30" />

<input type="text" name="s1score1" size="2" />

<input type="submit" value="Update Database" />

</form>

 

<form method="post" action="update.php">

<!--Softball 2 -->

<b>Softball Field II</b>

<br/>

 

V:

<input type="text" name="s2team" size="30" /> 

<input type="text" name="s2score" size="2" />

Status:

<input type="text" name="s2status" size="10" />

<br/>

H:

<input type="text" name="s2team1" size="30" />

<input type="text" name="s2score1" size="2" />

<input type="submit" value="Update Database" />

</form>

 

<form method="post" action="update.php">

<!--Gymnasium -->

<b>Gymnasium</b>

<br/>

 

V:

<input type="text" name="gteam" size="30" /> 

<input type="text" name="gscore" size="2" />

Status:

<input type="text" name="gstatus" size="10" />

<br/>

H:

<input type="text" name="gteam1" size="30" />

<input type="text" name="gscore1" size="2" />

<input type="submit" value="Update Database" />

 

</form>

 

</body>

Did you try shift-clicking the reload button?

Link to comment
Share on other sites

Thanks for the reply, but the hostname, password, host have all been set to their respective values so that the database can be accessed. So, how is hostname extraneous? Isn't it needed to access the db? The original code at top is misleading because the actual php file has the values.

 

I can clearly access the db and the php returns updated with new data, but why it doesn't update other instances of the php file is beyond me.

Link to comment
Share on other sites

I only see an insert query, if you wish to display data to users that didn't post the data you must select it from the database using a select query, then feth the data using a mysql_fetch function (such as mysql_fetch_row then display the fetched data accordingly. Once the page is refreshed, unless the browser is re-posting the data to php (probably the case), the values will disappear to the poster aswell as they haven't been posted...

Link to comment
Share on other sites

ah, got you. sorry. in the actual php file, that is not an issue.

 

<?php # BEGINNING OF PHP!

 

$gsteam= $_POST["gsteam"];

$gsteam1= $_POST["gsteam1"];

$gsstatus= $_POST["gsstatus"];

$gsscore= $_POST["gsscore"];

$gsscore1= $_POST["gsscore1"];

 

$bteam= $_POST["bteam"];

$bteam1= $_POST["bteam1"];

$bstatus= $_POST["bstatus"];

$bscore= $_POST["bscore"];

$bscore1= $_POST["bscore1"];

 

$s1team= $_POST["s1team"];

$s1team1= $_POST["s1team1"];

$s1status= $_POST["s1status"];

$s1score= $_POST["s1score"];

$s1score1= $_POST["s1score1"];

 

$s2team= $_POST["s2team"];

$s2team1= $_POST["s2team1"];

$s2status= $_POST["s2status"];

$s2score= $_POST["s2score"];

$s2score1= $_POST["s2score1"];

 

$gteam= $_POST["gteam"];

$gteam1= $_POST["gteam1"];

$gstatus= $_POST["gstatus"];

$gscore= $_POST["gscore"];

$gscore1= $_POST["gscore1"];

 

$username = "something";

$password = "something";

$hostname = "localhost";

 

//connection to the database

$dbhandle = mysql_connect($hostname, $username, $password)

or die("Unable to connect to MySQL" .mysql_error());

echo "Connected to MySQL<br>";

 

//select a database to work with

$selected = mysql_select_db("littleti_droid",$dbhandle)

  or die("Could not select examples" .mysql_error());

 

 

//insert data from php web page

 

$query="INSERT INTO stats (gsteam, gsteam1, gsstatus, gsscore, gsscore1, bteam, bteam1, bstatus, bscore, bscore1, s1team, s1team1, s1status, s1score, s1score1, s2team, s2team1, s2status, s2score, s2score1, gteam, gteam1, gstatus, gscore, gscore1) VALUES ('".$gsteam."','".$gsteam1."','".$gsstatus."','".$gsscore."','".$gsscore1."','".$bteam."','".$bteam1."','".$bstatus."','".$bscore."','".$bscore1."','".$s1team."','".$s1team1."','".$s1status."','".$s1score."','".$s1score1."','".$s2team."','".$s2team1."','".$s2status."','".$s2score."','".$s2score1."','".$gteam."','".$gteam1."','".$gstatus."','".$gscore."','".$gscore1."')";

 

$result = mysql_query($query) or die(mysql_error());

 

//fetch tha data from the database 

 

echo "[V]Team: " .$gsteam."  ".$gsscore."                              Status: ".$gsstatus. "<br>";// input from web based

echo "[H]Team: " .$gsteam1."  ".$gsscore1."<br><br>";// input from web based

 

echo "[V]Team: " .$bteam."  ".$bscore."                              Status: ".$bstatus. "<br>";// input from web based

echo "[H]Team: " .$bteam1."  ".$bscore1."<br><br>";// input from web based

 

echo "[V]Team: " .$s1team."  ".$s1score."                              Status: ".$s1status. "<br>";// input from web based

echo "[H]Team: " .$s1team1."  ".$s1score1."<br><br>";// input from web based

 

echo "[V]Team: " .$s2team."  ".$s2score."                              Status: ".$s2status. "<br>";// input from web based

echo "[H]Team: " .$s2team1."  ".$s2score1."<br><br>";// input from web based

 

echo "[V]Team: " .$gteam."  ".$gscore."                              Status: ".$gstatus. "<br>";// input from web based

echo "[H]Team: " .$gteam1."  ".$gscore1."<br><br>";// input from web based

 

 

//close the connection

mysql_close($dbhandle);

?>

Link to comment
Share on other sites

<?php # BEGINNING OF PHP!

$gsteam= $_POST["gsteam"];
$gsteam1= $_POST["gsteam1"];
$gsstatus= $_POST["gsstatus"];
$gsscore= $_POST["gsscore"];
$gsscore1= $_POST["gsscore1"];

$bteam= $_POST["bteam"];
$bteam1= $_POST["bteam1"];
$bstatus= $_POST["bstatus"];
$bscore= $_POST["bscore"];
$bscore1= $_POST["bscore1"];

$s1team= $_POST["s1team"];
$s1team1= $_POST["s1team1"];
$s1status= $_POST["s1status"];
$s1score= $_POST["s1score"];
$s1score1= $_POST["s1score1"];

$s2team= $_POST["s2team"];
$s2team1= $_POST["s2team1"];
$s2status= $_POST["s2status"];
$s2score= $_POST["s2score"];
$s2score1= $_POST["s2score1"];

$gteam= $_POST["gteam"];
$gteam1= $_POST["gteam1"];
$gstatus= $_POST["gstatus"];
$gscore= $_POST["gscore"];
$gscore1= $_POST["gscore1"];

$username = "something";
$password = "something";
$hostname = "localhost"; 

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password) 
or die("Unable to connect to MySQL" .mysql_error());
echo "Connected to MySQL<br>";

//select a database to work with
$selected = mysql_select_db("littleti_droid",$dbhandle) 
  or die("Could not select examples" .mysql_error());
  
   
//insert data from php web page

$query="INSERT INTO stats (gsteam, gsteam1, gsstatus, gsscore, gsscore1, bteam, bteam1, bstatus, bscore, bscore1, s1team, s1team1, s1status, s1score, s1score1, s2team, s2team1, s2status, s2score, s2score1, gteam, gteam1, gstatus, gscore, gscore1) VALUES ('".$gsteam."','".$gsteam1."','".$gsstatus."','".$gsscore."','".$gsscore1."','".$bteam."','".$bteam1."','".$bstatus."','".$bscore."','".$bscore1."','".$s1team."','".$s1team1."','".$s1status."','".$s1score."','".$s1score1."','".$s2team."','".$s2team1."','".$s2status."','".$s2score."','".$s2score1."','".$gteam."','".$gteam1."','".$gstatus."','".$gscore."','".$gscore1."')";

$result = mysql_query($query) or die(mysql_error());

//fetch tha data from the database  

echo "[V]Team: " .$gsteam."  ".$gsscore."                              Status: ".$gsstatus. "<br>";// input from web based
echo "[H]Team: " .$gsteam1."  ".$gsscore1."<br><br>";// input from web based

echo "[V]Team: " .$bteam."  ".$bscore."                              Status: ".$bstatus. "<br>";// input from web based
echo "[H]Team: " .$bteam1."  ".$bscore1."<br><br>";// input from web based

echo "[V]Team: " .$s1team."  ".$s1score."                              Status: ".$s1status. "<br>";// input from web based
echo "[H]Team: " .$s1team1."  ".$s1score1."<br><br>";// input from web based

echo "[V]Team: " .$s2team."  ".$s2score."                              Status: ".$s2status. "<br>";// input from web based
echo "[H]Team: " .$s2team1."  ".$s2score1."<br><br>";// input from web based

echo "[V]Team: " .$gteam."  ".$gscore."                              Status: ".$gstatus. "<br>";// input from web based
echo "[H]Team: " .$gteam1."  ".$gscore1."<br><br>";// input from web based


//close the connection
mysql_close($dbhandle);
?>

 

Can you post the ACTUAL code you have then, otherwise we can't really help...

 

 

Also, take a look at extract, you can use it on the post superglobal array so you dont have to define so many variables i.e.

 

$gsteam= $_POST["gsteam"];
$gsteam1= $_POST["gsteam1"];
$gsstatus= $_POST["gsstatus"];
$gsscore= $_POST["gsscore"];
$gsscore1= $_POST["gsscore1"];

$bteam= $_POST["bteam"];
$bteam1= $_POST["bteam1"];
$bstatus= $_POST["bstatus"];
$bscore= $_POST["bscore"];
$bscore1= $_POST["bscore1"];

$s1team= $_POST["s1team"];
$s1team1= $_POST["s1team1"];
$s1status= $_POST["s1status"];
$s1score= $_POST["s1score"];
$s1score1= $_POST["s1score1"];

$s2team= $_POST["s2team"];
$s2team1= $_POST["s2team1"];
$s2status= $_POST["s2status"];
$s2score= $_POST["s2score"];
$s2score1= $_POST["s2score1"];

$gteam= $_POST["gteam"];
$gteam1= $_POST["gteam1"];
$gstatus= $_POST["gstatus"];
$gscore= $_POST["gscore"];
$gscore1= $_POST["gscore1"];

//all of the above can be replaced by

extract($_POST);

Link to comment
Share on other sites

thanks andy,

 

here is my php as is. the html page where data is entered and posted to db is as above:

 

<?php # BEGINNING OF PHP!

 

$gsteam= $_POST["gsteam"];

$gsteam1= $_POST["gsteam1"];

$gsstatus= $_POST["gsstatus"];

$gsscore= $_POST["gsscore"];

$gsscore1= $_POST["gsscore1"];

 

$bteam= $_POST["bteam"];

$bteam1= $_POST["bteam1"];

$bstatus= $_POST["bstatus"];

$bscore= $_POST["bscore"];

$bscore1= $_POST["bscore1"];

 

$s1team= $_POST["s1team"];

$s1team1= $_POST["s1team1"];

$s1status= $_POST["s1status"];

$s1score= $_POST["s1score"];

$s1score1= $_POST["s1score1"];

 

$s2team= $_POST["s2team"];

$s2team1= $_POST["s2team1"];

$s2status= $_POST["s2status"];

$s2score= $_POST["s2score"];

$s2score1= $_POST["s2score1"];

 

$gteam= $_POST["gteam"];

$gteam1= $_POST["gteam1"];

$gstatus= $_POST["gstatus"];

$gscore= $_POST["gscore"];

$gscore1= $_POST["gscore1"];

 

//$username = "littleti";

//$password = "password";

//$hostname = "localhost";

 

//connection to the database

$dbhandle = mysql_connect("localhost","littleti_user","user")

or die("Unable to connect to MySQL" .mysql_error());

echo "Connected to MySQL<br>";

 

//select a database to work with

$selected = mysql_select_db("littleti_droid",$dbhandle)

  or die("Could not select examples" .mysql_error());

 

 

//insert data from php web page

 

$query="INSERT INTO stats (gsteam, gsteam1, gsstatus, gsscore, gsscore1, bteam, bteam1, bstatus, bscore, bscore1, s1team, s1team1, s1status, s1score, s1score1, s2team, s2team1, s2status, s2score, s2score1, gteam, gteam1, gstatus, gscore, gscore1) VALUES ('".$gsteam."','".$gsteam1."','".$gsstatus."','".$gsscore."','".$gsscore1."','".$bteam."','".$bteam1."','".$bstatus."','".$bscore."','".$bscore1."','".$s1team."','".$s1team1."','".$s1status."','".$s1score."','".$s1score1."','".$s2team."','".$s2team1."','".$s2status."','".$s2score."','".$s2score1."','".$gteam."','".$gteam1."','".$gstatus."','".$gscore."','".$gscore1."')";

 

$result = mysql_query($query) or die(mysql_error());

 

//fetch tha data from the database 

 

echo "[V]Team: " .$gsteam."  ".$gsscore."                              Status: ".$gsstatus. "<br>";// input from web based

echo "[H]Team: " .$gsteam1."  ".$gsscore1."<br><br>";// input from web based

 

echo "[V]Team: " .$bteam."  ".$bscore."                              Status: ".$bstatus. "<br>";// input from web based

echo "[H]Team: " .$bteam1."  ".$bscore1."<br><br>";// input from web based

 

echo "[V]Team: " .$s1team."  ".$s1score."                              Status: ".$s1status. "<br>";// input from web based

echo "[H]Team: " .$s1team1."  ".$s1score1."<br><br>";// input from web based

 

echo "[V]Team: " .$s2team."  ".$s2score."                              Status: ".$s2status. "<br>";// input from web based

echo "[H]Team: " .$s2team1."  ".$s2score1."<br><br>";// input from web based

 

echo "[V]Team: " .$gteam."  ".$gscore."                              Status: ".$gstatus. "<br>";// input from web based

echo "[H]Team: " .$gteam1."  ".$gscore1."<br><br>";// input from web based

 

 

//close the connection

mysql_close($dbhandle);

?>

Link to comment
Share on other sites

I only see an insert query, if you wish to display data to users that didn't post the data you must select it from the database using a select query, then feth the data using a mysql_fetch function (such as mysql_fetch_row then display the fetched data accordingly. Once the page is refreshed, unless the browser is re-posting the data to php (probably the case), the values will disappear to the poster aswell as they haven't been posted...

 

thanks Andy-H! Got it working! now issue of formatting to take care of  ::)

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.