RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
<?php preg_match("/(\d{4}\/\d{2}\/\d{2}\/[^ ]*)/","a b c d 1988/04/24/Hello e f g",$match); print_r($match); ?>
-
using the glob function with a $ function
RussellReal replied to carlosx2's topic in PHP Coding Help
$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. -
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.']"';
-
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
-
<?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); } ?>
-
[SOLVED] sends the email and populates the database great
RussellReal replied to sandbudd's topic in PHP Coding Help
yours isn't valid html? -
[SOLVED] sends the email and populates the database great
RussellReal replied to sandbudd's topic in PHP Coding Help
lol I never touched your sql so that error hasta do with something else -
add them with item_code as the array key. $_SESSION[$item_code] = array($item_name,$item_price,$item_quantity);
-
Sanity check - inserting multiple FK records
RussellReal replied to Jonob's topic in PHP Coding Help
what exactly is PK? is it the auto-incrementing key in the table? -
[SOLVED] sends the email and populates the database great
RussellReal replied to sandbudd's topic in PHP Coding Help
$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>"; -
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
-
this is probably more suited for open source forums or freelance forums.
-
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
-
what? and no I never used xajax lol
-
width: 100%; edit: oh yeah, wrong forum for this question
-
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.
-
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>
-
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">
-
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.
-
okay? whats the problem?
-
[SOLVED] whats wrong with my two functions
RussellReal replied to worldcomingtoanend's topic in PHP Coding Help
show us the errors you receive -
<?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.
-
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
-
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?
-
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