Jump to content

jeger003

Members
  • Posts

    260
  • Joined

  • Last visited

Everything posted by jeger003

  1. Hi everybody *asian accent*, im trying to figure out how to display xml in php i know how to do things like <condition> <conditionId>4000</conditionId> <conditionDisplayName>Very Good</conditionDisplayName> </condition> for each blah blah as $item $condition = $item->condition->conditionId echo $condition; BUT........how do i get these values in XML to display in php this <searchResult count="2"> I want to get the value of count to display help please
  2. anyone have any ideas or any links i can look at? thanks
  3. it wasn't actually...i went up and down that page a million times...can't figure it out...it requires some sort of zend thingy maybe i just dont know how to read it
  4. hey peeps, I am trying to get my site to display related youtube videos under the main video here is what i have $query=mysql_query("SELECT title,mp3ID,youtube_ID FROM songs ORDER BY RAND() LIMIT 10 ") or die("Error Occured"); $left = true; while($row=mysql_fetch_array($query)) { if ($left) { echo "<tr>"; } echo "<td align='justify' width='100%' cellspacing='2' cellpadding='2' >"; echo "<td><img src='http://img.youtube.com/vi/".$row['youtube_ID']."/default.jpg'></td>"; echo "<td nowrap><a href='/music.php?id=".$row['mp3ID']."'>".$row['title']."</a></td>"; echo"</td>"; if (!$left) { echo"</tr>"; } $left = !$left; } ?> this is basic info of how i am able to get youtube video titles and image....i want to use the same youtube.com video ID To get related videos please help!!
  5. dude your awesome!!! for some reason GET didnt work for me so I changed it to POST and it works great somebody deserves an e-HUG thanks again!!!
  6. thanks MadTechie i end up running into the same issue....when i click run it i get sent to my home page and this is what the URL looks like http://mysite.com/url-test.php?URL=http%3A%2F%2Fwww.youtube.com%3Fv%3DAkdfOsdfj&RUN=Run+IT I'm not able to get v= out by the way im testing this in IE and FFX and same issue thank you
  7. there is one more thing i need help with basically the v= code is taken to display the youtube video right under the form my issue is....I have no clue how to take the v=code out in the POST or GET in a FORM why.....because a URL (YOUTUBE) wont work in the URL bar ( i.e. www.mysite.com/video.php?youtubeURL=http://www.youtube.com?v=AkdfOsdfj) this wont work I want users to enter url then use MadTechie's code to get V and use that to get the video does this make sense? thanks again guys/gals
  8. man you are AWESOME!!!! I tested it and it works GREAT!!!! thank you
  9. hello, I am trying to figure out how I can take only the v= in the youtube urls i just want php to take v=nGawAhRjtoA and ignore everything else any ideas guys/gals? thanks
  10. hey david, i used your code above for a little bit but it ended up doing the same thing when i went back to index.php page from a index.php?a=32b=43 page I dont know why it keeps thing cookie is not set after it has been set. is there anything else i can try? thank you guys
  11. ok so i dont know how to cook but this is what i need help with i have a classified site that I am trying to use cookies to set it with states (ie. query=( WHERE state = $_cookie['state']) index.php is the main coding system of the site so everything goes through index.php (ie. index.php?a=32b=43) i want to use if(empty($_cookie['state'])) to see if the cookie is set or not for state and then it will show up their listings here is what it looks like //THIS IS ON index.php PAGE $cookie_state = $_COOKIE['state_nvc']; if(!isset($cookie_state)) { include "states.php"; } elseif (isset($cookie_state)) { run code for index.php } my problem is when it goes to the URL index.php?a=32b=43 it redirects back to states.php can't get around it help PLEASE!!! THANK YOU
  12. hello, here is my query $this->sql_query = "SELECT * FROM ".$this->classifieds_table." WHERE category ".$this->in_statement." AND live=1 "; the above works....but when I add {AND location = "".$_COOKIE["State"]."\"} - it doesnt work no matter what location equals it wont read query. as soon as i remove the extra AND it works. help please
  13. could you possibly give a short example on how i can run the download after 5 seconds?
  14. hello, is there a way to pause a few seconds before running a script. what im doing is, when a visitor clicks a download button. I want it to pause like 5 seconds and show a little logo before running the script to download the file. any ideas with this? Thanks Guys!
  15. oh your right! I was doing this before it was creating more than one cookie with "state". Thank You For the Help!!!!!
  16. No, no, Im not looking for a recipe I need help changing a cookie value that is already set..this is what I have $get_s = $_GET['s']; $expires = time() + 31536000; //setcookie(state, $get_s, $expires); <-this is the code that sets the cookie $_COOKIE['state'] = "changed"; //I found online that this code is supposed to change the value (doesnt change it) Just need a way to change the value already set I would really like some help with this thank you guys
  17. this is an awesome IDEA!!!! works great the other thing i wanted to do was to actually redirect mobile users to a different url like mobile.sitename.com because i wanted to create a page for mobile users to be able to just make purchases....it wouldn't have any of the texts or images......just a few "buy now" buttons any idea how i can go about that?
  18. ok, im testing out what you've recommended but im not really sure how it supposed to work... i create two of the same style sheets? or do i create two styles one for PC one for Mobile? how do i specify it on a font or something i.e <style=PC-font> word here </style> how do i use the mobile-font on the same thing? and as for the image part......well i have an image at the top....that shrinks when loaded in the browser and it really expands and displaces everything else
  19. my site consists on many images that are "drag and dropped" on the page......not cssed onto it...how do i get around that? and as for "media=handheld" is the page going to detect it as a handheld device and use the appropriate style sheet? thank you haku
  20. hi everyone, i am trying to create a code for my site to detect mobile phone users. it would redirect them to a replica of my site like mobile.mysite.com and it would be completely text.... my issue is detecting the users mobile device..i used many scripts and none have done the job or even detected the mobile phones i want to start out by if ( $_SERVER['HTTP_USER_AGENT'] --something like "IS LIKE"-- iphone) cause i cant do if ($_SERVER['HTTP_USER_AGENT'] = iphone) that would mean the entire user agent is "iphone" which it wont be i would appreciate help LINKS TO TUTORIALS WOULD HELP!!
  21. i double checked my code and i cant find any errors........and im 100% that there are listings with live = 1 so here is my code and hopefully you can catch what i cant also i removed some unnecessary code ini_set('error_reporting', E_ALL); $search_words = mysql_real_escape_string($_POST['szs']); $query_search_exact_match = mysql_query("SELECT title, id, live, description, search_text, image, date, price, location_city FROM cls_classifieds WHERE live = '1' AND search_text LIKE '%$search_words%' OR title LIKE '%$search_words%' OR description LIKE '%$search_words%'") or die(mysql_error()); $num_exact = mysql_num_rows($query_search_exact_match); //----------------below is the word match that is exact-------- if($num_exact > 0) { $num_sub_one = ($num_exact - 1 ); while ($fetch_exact = mysql_fetch_array($query_search_exact_match) ) { while ($fetch_exact = mysql_fetch_array($query_search_exact_match) ) { if($fetch_exact['image'] > 0) { $selections = "thumb_filename,thumb_url,full_filename,classified_id,image_width,image_height,original_image_height,original_image_width,display_order"; $from = "cls_classifieds_images_urls"; $image = mysql_query("SELECT $selections FROM $from WHERE classified_id = '".$fetch_exact['id']."' AND '".$fetch_exact['live']."' = 1") or die(mysql_error()); $fetch_file = mysql_fetch_array($image); if($fetch_file['display_order'] == 1) { if($fetch_file['thumb_filename'] == 0) { $thumb_url = "user_images/".$fetch_file['full_filename']."'"; $height = $fetch_file['original_image_height']; $width = $fetch_file['original_image_width']; if($width > $height) { $newwidth=49; $newheight=ceil(($height/$width)*$newwidth); } else { $newheight=50; $newwidth=ceil(($width/$height)*$newheight); } } else { $thumb_url = "user_images/".$fetch_file['thumb_filename']."'"; //$mouse_over_image = "/".$fetch_file['thumb_url']."'"; $height = $fetch_file['original_image_height']; $width = $fetch_file['original_image_width']; if($width > $height) { $newwidth=49; $newheight=ceil(($height/$width)*$newwidth); } else { $newheight=50; $newwidth=ceil(($width/$height)*$newheight); } } } } else { $thumb_url = 'images/misc/nophoto.gif'; $newwidth = '49' ; $newheight = '37'; } echo "<tr>"; $ad_num = $fetch_exact['id']; if($background_color == "#C9FFBB") { $background_color = "#E8FFE1"; } else { $background_color = "#C9FFBB"; } echo "<td align='center' bgcolor='$background_color'><a href='/index.php?a=2&b=$ad_num' class='results'><img src='/$thumb_url' width='$newwidth' height='$newheight' border=0></a></td>"; echo "<td bgcolor='$background_color'><a href='/index.php?a=2&b=$ad_num' class='results'>".urldecode($fetch_exact['title'])."</a></td>"; echo "<td align='center' bgcolor='$background_color' class='results'>".ucwords(strtolower($fetch_exact['location_city']))."</td>"; echo "<td align='center' bgcolor='$background_color' class='results'>".$fetch_exact['price']."</td>"; echo "<td align='center' bgcolor='$background_color' class='results'>".date('m/d/y', $fetch_exact['date'])."</td>"; echo "</tr>"; } echo "</table>"; } } //-------------------------below is the word match thats not exact else {
  22. no it didnt work........i dont think it makes a difference since when i run the query it definitly works....but i double checked everything even my db and still same result........i even tested it........like this if($query['live'] == 1) { echo "it works!"; } so now we know that the live is being called from the query.....but not sure why its not selecting only 1's
×
×
  • 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.