Many IDE's have built in checkers / parsers, you may want to look into getting one -e.g. phpDesigner. Other than that, I don't know any PHP checker of such like HTML/CSS checker, sorry.
Last edited by Iszak; 03-05-2009 at 07:23 PM..
Reason: bah, bad wording
if (isset($_GET['sID'])) { $idReference = $_GET['sID']; } if (isset($_GET['Cat'])) { $cat = $_GET['Cat']; } }
$pageinfo = "SELECT * FROM stores Where name = '$idReference'"; $result = mysql_query($pageinfo)or die(mysql_error); }
if ($result) {
if( isset($_POST['submit'])) { if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) { // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. $sql="UPDATE ratings SET used_ips = NULL, total_value = 0, total_votes = 0 WHERE id IN ('valuetemp', 'easeofusetemp', 'deliverytemp', 'delchargetemp')"; $query = mysql_query($sql);
$message="";
unset($_SESSION['security_code']); } else { // Insert your code for showing an error message here $message="Sorry, you have provided an invalid security code"; } } else {}
// CHECK TO SEE IF THERE IS A TOTAL VOTES FIELD FOR THE STORE IF NOT ADD ONE $totalquery = "SELECT * FROM ratings WHERE id = '$IDTotal'"; $ttl = mysql_query($totalquery); $ttl_rows = mysql_num_rows($ttl);
//RSS TOP10 $rss_feed = "SELECT * FROM rss_feeds WHERE store = '$idReference' AND description = 'top'"; $rss_result = mysql_query($rss_feed); $rss_row = mysql_fetch_array ($rss_result); $rssIndividual = $rss_row['s_FeedURL']; $selectsql = "select s_itemList from rss_feeds where description = 'top' and s_FeedURL='$rssIndividual'"; $sql_run = mysql_query($selectsql) or die(mysql_error()); $itemList = mysql_fetch_row($sql_run); $itemList = explode("^",$itemList[0]);//[0] determins the column number
$rss_feedLO = "SELECT * FROM rss_feeds WHERE store = '$idReference' AND description = 'offers'"; $rss_resultLO = mysql_query($rss_feedLO); $rss_rowLO = mysql_fetch_array ($rss_resultLO); $rssIndividualLO = $rss_rowLO['s_FeedURL']; $selectsqlLO = "select s_itemList from rss_feeds where description = 'offers' and s_FeedURL='$rssIndividualLO'"; $sql_run = mysql_query($selectsqlLO) or die(mysql_error()); $itemListLO = mysql_fetch_row($sql_run); $itemListLO = explode("^",$itemListLO[0]);//[0] determins the column number
//RSS NEW RELEASES $rss_feedNR = "SELECT * FROM rss_feeds WHERE store = '$idReference' AND description = 'newest'"; $rss_resultNR = mysql_query($rss_feedNR); $rss_rowNR = mysql_fetch_array ($rss_resultNR); $rssIndividualNR = $rss_rowNR['s_FeedURL']; $selectsqlNR = "select s_itemList from rss_feeds where description = 'newest' and s_FeedURL='$rssIndividualNR'"; $sql_run = mysql_query($selectsqlNR) or die(mysql_error()); $itemListNR = mysql_fetch_row($sql_run); $itemListNR = explode("^",$itemListNR[0]);//[0] determins the column number
//RSS DISCOUNT CODES $rss_feedDC = "SELECT * FROM rss_feeds WHERE store = '$idReference' AND description = 'codes'"; $rss_resultDC = mysql_query($rss_feedDC); $rss_rowDC = mysql_fetch_array ($rss_resultDC); $rssIndividualDC = $rss_rowDC['s_FeedURL'];
//Get sore overall value //$storerating = $idReference."total"; //$value_query = "Select * FROM ratings WHERE id = '$storerating'"; $value_query = "Select * FROM ratings WHERE id = '$idReference"."value'"; $query_result = mysql_query($value_query); $result_rows = mysql_fetch_array($query_result); $no_votes = $result_rows['total_votes']; $tot_value = $result_rows['total_value'];
<?php } ?> <script type="text/javascript"> //Call dropdowncontent.init("anchorID", "positionString", glideduration, "revealBehavior") at the end of the page:
for some reason it doesnt like my $message varible and when i submit the form it takes it to a new page instead of just printing a message on the current page?
hi mate, that got rid of the message thanks, but the varible $message is defined here
PHP Code:
if( isset($_POST['submit'])) { if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) { // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. $sql="UPDATE ratings SET used_ips = NULL, total_value = 0, total_votes = 0 WHERE id IN ('valuetemp', 'easeofusetemp', 'deliverytemp', 'delchargetemp')"; $query = mysql_query($sql);
[COLOR="Red"]$message[/COLOR]="";
unset($_SESSION['security_code']); } else { // Insert your code for showing an error message here [COLOR="Red"]$message[/COLOR]="Sorry, you have provided an invalid security code"; } } else {}
p.s dont suppose you know how to stop the form submitting to another version of the current page, try it out on my page if i could prevent this and just have the messages appear on the current page that would be sweet!!