Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. <?php preg_match("/(\d{4}\/\d{2}\/\d{2}\/[^ ]*)/","a b c d 1988/04/24/Hello e f g",$match); print_r($match); ?>
  2. $model = $_GET['id']; $movie = glob(functionToUse()."components/content/videos/downloads/$path/*.jpg"); $filename = explode(":",$model); $filename2 = explode("-",$filename[1]); $space = " "; $path = $filename2[0]. $space . $filename2[1]; . is the concatenation operator you can use it in conjunction with functions aswell as variables.
  3. Ja, do sumfin like this: $_SESSION['items'][$item_code] = bla bla bla; den when you loop just do foreach ($_SESSION['items'] as $k => $v) { // $v will hold the array for whatever itemcodes are in your item list and $k will be your item_code } and you're gonna wanna echo something like dis: echo 'name="item_quantity['.$k.']"';
  4. I can't get their EXACT same code but I can code you something VERY similar to this.. add me to msn or aim RussellonMSN@hotmail.com = MSN RussellCrevatas = AIM
  5. <?php function getFile($url) { $c = curl_init($url); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_HEADER, 0); $res = curl_exec($c); curl_close($c); return $res; } $i = getFile("http://www.flightstats.com/go/rss/airportdelays.do"); $xml = simplexml_load_string($i); foreach ($xml->channel->item as $k => $v) { print_r($v); } ?>
  6. lol I never touched your sql so that error hasta do with something else
  7. add them with item_code as the array key. $_SESSION[$item_code] = array($item_name,$item_price,$item_quantity);
  8. what exactly is PK? is it the auto-incrementing key in the table?
  9. $finalfile.="<a href=".$Domain."/".$cdir."/".$name[count($name)-1].">".$name[count($name)-1]."</a>"; change ^^ to $finalfile.="<a href=".$Domain."/".$cdir."/".$name[count($name)-1]."><img src='".$name[count($name)-1]."' /></a>";
  10. w0rd, but also <div> tags default to 100% so he might be referring to another div inside of a div with a fixed width, in which case he'd need to set the new div's width to 100% and its position to absolute, but that would overlap any divs which were supposed to be above it so you'd use some padding etc
  11. this is probably more suited for open source forums or freelance forums.
  12. I used it in this fashion because both expected variables are strings and this array secludes the map to just two with array($_POST['username'],$_POST['password']) now I know this isn't a good practice for such a little bit of values as it woulda been less typing to just escape them 1 by 1, but I was just going with what I was thinking . but sanitizing 2 values that you EXPECT to be strings with array map shouldn't be taboo, but I can see your concern here for other people reading the data herein, however, even if you did escape every value from $_POST with mysql_real_escape_string via array_map, its still not tampering with the actual $_POST array its returning the array, and furthermore it WOULD be sanitized, and when it comes down to it there is very limited other ways besides type-casting that you can use to sanitize your inputs. so even in that respect it shouldn't be taboo. but I see where you're coming from oh and sorry for the paragraph lol I don't want to come across as defensive I'm not being defensive just shedding my thoughts aswell. <3
  13. what? and no I never used xajax lol
  14. width: 100%; edit: oh yeah, wrong forum for this question
  15. handle will only trigger onload, then everytime you change your selectbox the same methods will re-trigger, the onload is just to use your 'ajax' functions on page load.
  16. as my last post suggests you should do something like this: <script type="text/javascript"> function handle() { xajax_updateFormValeurs((e = document.getElementById("myS")).value); toggleMain(e); } window.onload = handle; </script> <select id="myS"><option>HI!</option><option>HI!2</option><option>HI!3</option></select>
  17. not sure why since I can't see your code, however, just run that query for your onload you could do it two ways function yourFunction() { // get the data necessary to send to your php file } window.onload = yourFunction; or.. <body onload="yourFunction">
  18. you could probably do something with left top css properties and some javascript and "createElement" javascript links. and then send whatever he lays out on the page including the X Y positions of them and use absolute positioning on the objects lol.. I could think of a couple other ways of doing this but it'd take a ton of time and ALOT of knowledge so the X Y type thing would probably be the easiest.
  19. okay? whats the problem?
  20. show us the errors you receive
  21. <?php if ($current = each($_GET)) { mysql_connect("xxxxx","xxxxxx","xxxxxxxx"); $q = mysql_query("SELECT * FROM table WHERE ID = '{$current['key']}'"); echo "<?xml version=\"1.0\"?>\n"; echo "<mail_list>\n"; if ($row = mysql_fetch_assoc($q)) { echo "<item>{$row}</item>\n"; } echo "</mail_list>"; } ?> basically the same as Keith's but a lil shorter n stuff Sorry I kinda left last night, I fell asleep I was tired.
  22. You just said you want 1 url to point to 2 different urls, its impossible You don't use htaccess to keep the url from changing, you use a frame
  23. ok I'm gonna ask you, distributor1111111111k is that a key in an array.. or where/how do you expect to associate this with your result? is it a field in the database? a name of a file?
  24. please show me an example URLRequest you use to connect to your php file.. and then give me an example of your desired output, and than I or somebody else will be able to help you better
×
×
  • 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.