Jump to content

[SOLVED] question about php page validation


shadiadiph

Recommended Posts

Hi I have kept the site I have been building clean in html and css but now I have added php to it it will not validate any more on w3.org I am using

 


<?php

include("../secure/global/connection.php");

$tradesql="select * from tblpricesymbolsdetails where active='Yes' AND type='S' ";
$tempdata=$DB_site->query($tradesql);
$pricecount=$DB_site->num_rows($tempdata);
while($row=$DB_site->fetch_array($tempdata))
{
$symid         = $row["intSymbolsID"];
$symbol        = $row["symbol"];
$current       = $row["current"];
$diff          = $row["diff"];

$newcurrent = number_format($current,2);
$newdiff    = number_format($diff,2);
if ($diff>0)
{
$pricetype6="positive";
}
if ($diff<0)
{
$pricetype6="negative";
}
if ($diff==0)
{
$pricetype6="unchanged";
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>APA</title>
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="menu.css">
</head>
<body>

 

What kind of doctype should i be using keeps giving me a prolog error q in query is not allowed then $ is not allowed???

mmm i got it working now and it validates fine 100%

 

I have learnt the hard way it is a good idea to validat everything as there are alot of cross browser issues in web design but if the page validates on w3 it usually works in all browsers

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.