Jump to content

Shad

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Shad's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. can anyone tell me if nVidia FX5200 AGP 128MB would be compatible to run all the graphical features on vista? here is the link to an example on eBay of this product: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=130055133383
  2. Shad

    PHP & Flash

    no, i want guests to be able to embed flash files, however i want to disable script access from these files. I think myspace has done something like this.
  3. Hey, I was wondering how i would go about stopping script access in flash scripts. E.g. if i was to allow my guest book to be html enabled and someone was to embed a flash file which can set/change cookies. How would i disable these functions? Hope you can help!
  4. you need to change your charset value in the meta tag!
  5. that does not work with a string that has been applied with htmlspecialchars
  6. i am entering information into a field in a table, for example 'message'. this is being entered as htmlspecialchars($message); What i would like to know is, when selecting this field from the table and "echo"ing it, bearing in mind that i htmlspecialchars'd it when it was entered, how can i create a secure function to allow certain html tags however in the same time block all other html tags and disable PHP. Hope you can help!
  7. Shad

    hide/show

    [code]function showhide(name) { var object = null; object = document.getElementById(name); if (object.style.display == "none") { object.style.display = ""; } else { object.style.display = "none"; } }[/code] why doesn't this work in firefox?
  8. try to use elseif, its faster and easier. Also, dont insert data straight from a post into the database, you can be easily SQL injected. for example, [code=php:0]$checkit = "SELECT userid FROM users WHERE username = '".$_POST['user']."' AND password = '$securepass'";[/code] should be [code=php:0]$user = htmlspecialchars($_POST['user']); $checkit = "SELECT userid FROM users WHERE username = '$user' AND password = '$securepass'";[/code] [/code] and for here: [code=php:0]$updateip = mysql_query("Update users SET lastip = '$ip' WHERE username = '".$_POST['user']."' AND password = '$securepass'"); //update last active in user table $updateactive = mysql_query("Update users SET lastactive = unix_timestamp() WHERE username = '".$_POST['user']."' AND password = '$securepass'"); //update session id in user table $updatesid = mysql_query("Update users SET sessionid = '$sesid' WHERE username = '".$_POST['user']."' AND password = '$securepass'"); //all checks complete - redirect[/code] make it all in one: [code=php:0]$update = mysql_query("Update users SET lastip = '$ip',lastactive = unix_timestamp(),sessionid = '$sesid' WHERE username = '".$_POST['user']."' AND password = '$securepass'");[/code]
  9. [code=php:0]<?php if ($_GET['category']) { //this would be retrieved from e.g. index.php?category=something $category = $_GET['category']; //Lets say your table name is "products" $select = mysql_query("SELECT * FROM `products` WHERE `category`= '$category' ORDER BY `store_item_number` DESC"); echo "<TABLE>"; while ($qry = mysql_fetch_array($select)) { echo " <TR> <TD>$qry[name]</TD><TD><IMG BORDER=\"0\" SRC=\"$qry[price_small_picture]\"></TD><TD>$qry[price]</TD> </TR> "; } echo "</TABLE>"; } ?>[/code] A very insecure and simple example.
  10. Hey guys, first time posting in this forum. I was wondering how i would go about displaying data from a table vertically and horizontally. allow me to explain: i have a table named "table" and one field inside it named "name" with 9 rows i make a query and i display all rows in this table e.g. [code=php:0] echo "<TABLE>"; $query = mysql_query("SELECT * FROM table"); while ($qry = mysql_fetch_array($query)) { echo "<TR><TD>$qry[name]</TD></TR>"; } echo "</TABLE>"; [/code] naturally this will display the "names" vertically in the table with 9 rows. I would like to know how i would be able to display them so that it would display 3 rows and 3 coloumns which display all 9 names in this format. Hope you can help!
×
×
  • 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.