Borzoi 24 Posting Whiz

I had a look at your source code and have an idea which may work.

Try this:

Get rid of the margins in the table then wrap the table in a <div> tag with the width of the image you're trying to align it with like this:

<div style="width: 900px; margin-left:auto; margin-right:auto;"><table id="web-buttons-idld2xa">REST OF MENU BUTTON CODE</table></div>

All you'll need to do is replace the 900px with whatever the width of the section you want to align it with is.

Borzoi 24 Posting Whiz

What's the code you're using to try align it where you want?

Borzoi 24 Posting Whiz

Nevermind that, I found your error.

Remove every instance you have of exit; .

From what I can see, that's on lines 29 and 36.

When exit; is called, it stops rendering all code after it which is why nothing is displayed.

Borzoi 24 Posting Whiz

Which is the reason I doubted it would fix it.

Here's an obvious question I should have already asked:

Does the server you're using support PHP?

Borzoi 24 Posting Whiz

You have 2 errors in your code before the bit that doesn't process. I doubt it will fix the problem but you probably want to fix them.

Line 12:

<div class="graph" style="margin-left: 0px; margin-right: 0px;" display="inline">

Should be:

<div class="graph" style="margin-left: 0px; margin-right: 0px; display: inline;">

Line 13:

<align="left">

This isn't needed as the default alignment is the left and there is no <align> tag.

Borzoi 24 Posting Whiz

What is showing in the code on the loaded page? (View > Page Source)

Borzoi 24 Posting Whiz

Instead of wrapping the whole site in a <div> tag, set the body to have a background colour in the CSS:

body
{
  background-color: #104e8b;
}

The reason why you're getting the white border is because you're wrapping it all in a <div> which naturally has a bit of padding all around.

Also, here's some errors with your code:

-The link to the stylesheet should be in the <head> tag.
-You're missing a <head> and <title> tag.
-You haven't closed your <form> tag
-You haven't closed any of your <option> tags
-You haven't closed your link to the stylesheet or <input> tag (end with /> instead of just >)

Borzoi 24 Posting Whiz

Just so you know, you aren't closing your form tag in the first page.

I don't believe you can POST the value of a button. It would probably be better to have a check box saying "include responsible?" before the "Submit" button.

Borzoi 24 Posting Whiz

I think your error is with your date variables:

$datef = date("Y-m-d",mktime(0, 0, 0, $_GET['year'], $_GET['month'], $_GET['day']));
$datel = date("Y-m-d",mktime(0, 0, 0, $_GET['year1'], $_GET['month1'], $_GET['day1']));

Are you getting any error messages or is it just not grabbing anything from the database? I've just made a guess at what could be wrong since I don't know if you're getting any type of error message.

Borzoi 24 Posting Whiz

You're adding the same value over and over again $row['Team'] Assuming each team has their own names (Team1, Team2, Team3 etc) then you could try this:

$div_GP=$ttl_GP[$row['Team1']]+$ttl_GP[$row['Team2']]+$ttl_GP[$row['Team3']]+$ttl_GP[$row['Team4']];

All I've done is add numbers to each.

Borzoi 24 Posting Whiz

if i watch a video i cant see it normal,if i play a game it take wery wery long time...etc...a i forget,i also use iobit securiti 360....

If it's just the graphics, videos not playing right and games working slowly, it might be a problem with the graphics card and not the speed of the computer. Do other programs/files take a while to load?

Borzoi 24 Posting Whiz

If you want the default colour of all text on the page changed, put it in the body section instead of a class:

body
{
  color: #hexval;
}

Replace hexval with the hexadecimal value of the colour you want.

Borzoi 24 Posting Whiz

All you need to do is update the field.

Assuming your stock levels are labelled "Stock" in the database and the items are labelled "item":

<?php
  
  /*After obtaining the stock level from the database and putting it into the variable $stocklevel and placing the amount just bought into the variable $bought.*/
  $newstock = stocklevel - $bought;

  /*Update the database with the new stock level, assuming the item just bought has been placed in the $itembought variable.*/
  mysql_query("UPDATE tablename SET Stock = '$newstock' WHERE item = '$itembought'");
?>
Borzoi 24 Posting Whiz

Remember to mark the thread as solved if you've found a solution.

Borzoi 24 Posting Whiz

You haven't closed either of those if statements.

<?php
if($resultNews = $c_ss_news->GetNewsById())
{
  if($rowNews = @mysql_fetch_array($resultNews))
  {
    $pageTitle = $rowNews["NEW_Headline"];
  }
}
?>
Borzoi 24 Posting Whiz

I understand what you mean now.

If $rowNews["NEW_Headline"] is being set in one of the included files before the <title> tag, you could just use that or set $pageTitle using $pageTitle = $rowNews["NEW_Headline"]

Borzoi 24 Posting Whiz

Like ardav said, you need to set $pageTitle before it can be used. Is it being set in one of the included files before the <title> tag?

Borzoi 24 Posting Whiz

When you click "view source" on the outputted page, what does <img src="images/<?php echo $thumbnail ?>" /> display?

If $thumbnail doesn't have a file extension then it's going to be just linking to a folder as the image source.

Borzoi 24 Posting Whiz

With your update, it's updating all the entries as you haven't specified a WHERE in it.

I would suggest changing the form on editme.php to this:

while($row = mysql_fetch_array($result))
  {
  echo "Record <br />";
  echo "Studen id: <input type='text' name='s' disabled='disabled' value="  . $row['Studid'] . ">"  . "<br />";
  echo "First Name: <input type='text' name='e' value="  . $row['Fname'] . ">"  .  "<br />";
  echo "Last Name: <input type='text' name='f' value="  . $row['Lname'] . ">" .  "<br />";
  };

This way you could use it to make sure you only modify the right row in editme1.php like this:

<?php
$a=$_POST['e'];
$b=$_POST['f'];
$c=$_POST['s'];
 
$con = mysql_connect("localhost","----","----");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
mysql_select_db("----", $con);
 
$query="UPDATE Sample SET Fname='$a', Lname='$b' WHERE Studid='$c'";
mysql_query($query) or die('mysql error ' . mysql_error() . ' in query : ' . $query);
 
echo "Successful";
 
mysql_close($con);
?>

That should stop it completely emptying the database. Let me know if it still causes the line you're trying to edit to be empty.

Borzoi 24 Posting Whiz

You put the wrong type of single quotes on the line:

$sql="UPDATE `Sample` SET `Fname`='$a',`Lname`='$b'";

Here's the correction:

$sql="UPDATE 'Sample' SET 'Fname'='$a','Lname'='$b'";

You shouldn't need the quotes though so this should work:

$sql="UPDATE Sample SET Fname='$a',Lname='$b'";

You cannot update the database if there is no information in the database in the first place though!

If you're just trying to insert the data into the table, this is what you should be using:

$sql = "INSERT INTO Sample (Fname, Lname) VALUES ('$a', '$b')"
Borzoi 24 Posting Whiz

Are you saying you're going to lie on your resume?

Borzoi 24 Posting Whiz

I thought I responded to this last night... I must have closed the browser before the page loaded.

All I mentioned was that I made an error and shouldn't have put the space before/after the wildcards since it will then search the database for those spaces but by the looks of it, you have realised my error.

Borzoi 24 Posting Whiz

Instead of having all the PHP in the head, you could add the if statement inline:

<?php 
	session_start();


if(isset($_SESSION['validUser']))
	{
	if ($_SESSION['validUser']!= "True") 
		die("You are not allowed here!!");
	} 
else
	die("You are not allowed here!");
	
if (isset($_POST['update'])) {

// Save the changes
	$currentrow = $_SESSION['currentrow'];

// (more php code not shown)
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>

</head>
<body >
	<form id="orderForm" method="post" >
		


	<?php
          if ($_SESSION['filter'] <> 'N')
          {
	    echo "<div id=\"tel1\" style=\"display:none\">Viewing all whose payment has NOT been confirmed.</div>";
	  }
          else
          {
	    echo "<div id=\"tel2\" style=\"display:none\">Viewing all who have been confirmed.</div>";
	  }
        ?>
		
		<fieldset>
		<legend>About You</legend>
	<div class="grid_3">										
		<input type="text"  size="30" maxlength="30" tabindex="1" name="fname" id="fname" />
    </div><!-- end .grid_3 -->
    
    		<div class="clearb"></div>
    		
  <div class="grid_2">
	<input type="text"  size="30" maxlength="30" tabindex="2"  name="lname" id="lname" />
    </div><!-- end .grid_2 -->

</form>

</body>
</html>
Borzoi 24 Posting Whiz

I believe this should work:

$query = "SELECT * FROM classics WHERE author LIKE '% $author %' OR title LIKE '% $title %' OR year LIKE '% $year %' OR isbn LIKE '% $isbn %'";

The percent symbols are wildcards so if "$author" was set to "Mark" then it should return anything with "Mark" under the author column in your database whether that be Mark Twain, Graham Marks. or anyone else with "Mark" in their name.

If the LIKE qualifier doesn't work then try with your original way but still using the wildcards.

Borzoi 24 Posting Whiz

Have you called their tech support? If you have an account with them their tech support is free. I can't make out what the problem is from that e-mail you got sent so I unfortunately can't help.

Not really useful information for you, but I live in the same city Fasthosts is located and work just down the road from them.