I want to help people, but if i copy the code in their post, and paste it to my editor the code looks horrible
How do you test others' codes?
Moderator: General Moderators
Code: Select all
<?php
$res = mysql_query("SELECT * FROM ".$DBprefix."signup WHERE username like '%$searchname%' and fullname like'%$name%' and state like'%$state%' and gender like'$gender%' and userlevel='1' and actnum='0' and '$currentyear'-dobyear >= $lowage and '$currentyear'-dobyear <= '$highage' {$image}");
?>Code: Select all
<?php
$tablename = $DBprefix."signup";
$sqlstatement = "SELECT * FROM $tablename WHERE
username LIKE '%$searchname%' AND
fullname LIKE '%$name%' AND
state LIKE '%$state%' AND
gender LIKE '$gender%' AND
userlevel = '1' AND
actnum = '0' AND
'$currentyear'-dobyear >= $lowage AND
'$currentyear'-dobyear <= '$highage' {$image}
";
$runquery = mysql_query($sqlstatement);
?>In what way does it look horrible, strange characters, lack of line breaks or just indentation ?dethron wrote:I want to help people, but if i copy the code in their post, and paste it to my editor the code looks horribleIt lost all readability.
Code: Select all
tags are set up almost exactly the same as the old ones, with a few feature additions that were needed. The code still appears in a single table cell, by itself.