-
Posts
541 -
Joined
-
Last visited
Posts posted by burnside
-
-
people will be able to insert mysql and java in your strings if un protected.
$search = trim(htmlspecialchars($_POST['search'], ENT_QUOTES));
May not be 100% safe but its better than not being safe at all.
-
i would also sanatize your search?
$search=$_POST["search"];
-
Actually, the field names don't need any quotes... Sorry bout that. But it is good practice to use the back ticks like burnside used.
I normaly dont use them lol but i woke up other day and poof its like second nature to add them lol.
If that makes any sense ???
-
mysql_query("INSERT INTO `interactive`` (`name`, `theme`) VALUES ('$name', '$theme' ") or die(mysql_error());
-
Thank you.
i owe you both a beer
-
Thank you TLG,
Just a slight problem though if there in no radio boc CHECKED you get the broken image image, i have tried to set one of the radio boxed to CHECKED in hope it would load the checked image but no such luck, Any ideas?
Thank you again.
-
Tried that but got loads of confusing scripts lol.
ill try your link
-
Hey,
I am trying to make a form where if you click a value via a radio button
how would i get it to change a image?
-
Yeah I'm growing my hair out and everything.
Ha Ha. I was addicted to that game at one point. I even cried when aries died!!
-
Kenjutsu basically involves becoming a badass with a sword.
Like sephiroth in final fantasy 7
-
select from db WHERE id = > 0
maybe somthing like that?
-
i want to master how to make the perfect cookie
mmmmmmmmmmm
-
Gives me another reason to post this clip again: http://www.youtube.com/watch?v=FdpqH1_EC7A
- Mr. Murphy, do you mean that you lied on you application?- No. Well, oh, yes. Only to get my foot in the door :)
Bah i just got " Sorry this video is no longer available "
-
You my friend are a genius haha
thank you.
-
if($_GET['mod'] == "view" ) { if (!mysql_select_db("blog")) { echo "Unable to select mydbname: " . mysql_error(); exit; } $sql = "SELECT * FROM `accounts` WHERE `access` = 1 "; $result = mysql_query($sql); if (!$result) { echo "Could not successfully run query ($sql) from DB: " . mysql_error(); exit; } if (mysql_num_rows($result) == 0) { echo "<h1>Sorry there is no accounts to see. </h1><br />"; } $record = mysql_num_rows($result); echo " <h1>There is a total of <strong>{$record}</strong> accounts you may see.</h1>"; echo " <table> <tr><td width=\"25%\">Account ID </td> <td width=\"25%\"> Account Name </td> </tr> "; while ($a = mysql_fetch_assoc($result)) { echo " <tr><td width=\"25%\">{$a['id']} </td> <td width=\"25%\"> {$a['name']} </td></tr>"; } echo " </table> "; }
-
Create a variable with "on" and "off" states. Then just toggle it for each row and use that var to determine which color to use.
that means ill have to add a new record the the database though.
-
Howdy!!
I can't really decide if this is a PHP Problem or HTML ??? ???
So i just posted it in here.
I have a mysql array that returns results from a data base.
I want to put thm in a table i can do this bit.
But how would i get the table <td> colors to show two (2) diffrent colors?
Like the replies on here. They go White then Blue then White etc ... ...
Any way sorry if its in wrong bored
-
Same problem... the documents are not ordered as the value in the "IN" clause...
Thore told you you can't do it:
There isn't a way (that I'm aware of) to order by the order of your WHERE clause.
On a side note, your query could be made simpler.
SELECT no_document,titre_document FROM document WHERE no_document IN(3,1,2);
Looks like you may need to re think it or do three sperate querys.
-
ORDER BY DESC or ORDER BY ASC
-
sorted this line is wrong
echo "Article:<br /><textarea cols=\"50\" rows=\"10\" name=\"article\" value=\"{$row['article']}\" onkeyup=\"textLimit(this, 500)\"</textarea><br />";
it should be
echo "Article:<br /><textarea cols=\"50\" rows=\"10\" name=\"article\" onkeyup=\"textLimit(this, 500)\">{$row['article']}</textarea><br />";
so it is
-
try:
$sql = ("SELECT * FROM $table WHERE id = $id"); $result = mysql_query($sql); $row = mysql_fetch_array($result) or die(mysql_error()); echo "<form action=\"insert.php\" method=\"post\">"; echo "Date: <input type=\"text\" name=\"date\" value=\"{$row['date']}\" /><br /><br>"; echo "Title: <input type=\"text\" name=\"title\" value=\"{$row['title']}\" /><br /><br />"; echo "Article:<br /><textarea cols=\"50\" rows=\"10\" name=\"article\" value=\"{$row['article']}\" onkeyup=\"textLimit(this, 500)\"</textarea><br />"; echo "<input type=\"submit\" />"; echo "</form>";
-
how can you use this
<?=$row['date'];?>
in a php tag that is open ???
wouldnt you have to close the open tag first?
-
Hell of a lot better than ms paint lol
-
oop noob members system
in PHP Coding Help
Posted
@ CORBIN
some nice comments there made me giggle