-
Posts
393 -
Joined
-
Last visited
Everything posted by npsari
-
Oh, cool, it worked, thank you
-
Hi everyone, i have a problem, look at this small PHP code $currency_symbol = '£'; \\\ Thats £ print "Price: $currency_symbol5"; The item price is 5 pounds, but because the 5 is attached, the code thinks the string name is $currency_symbol5 It does not work, to solve this, i put a space between them, like this... $currency_symbol = '£'; \\\ Thats £ print "Price: $currency_symbol 5"; But it looks funny on my website, it looks like this £ 5 How to solve this, thank you in advance
-
Okay, I've done it Thank you much guys <script type="text/javascript"> <!-- function delayer(){ document.getElementById("myDiv").style.display="block"; setTimeout("hide()", 5000); // 5 seconds } function hide() { document.getElementById("myDiv").style.display="none"; } //--> </script> <div id = "myDiv" style="display:none"><img id = "myImage" src = "/images/logo.png"></div><br> <body onload="setTimeout('delayer()', 8000)">
-
okay, i've done the show but the hide i cant please help <script type="text/javascript"> <!-- function delayer(){ document.getElementById("myDiv").style.display="block"; } //--> </script> <div id = "myDiv" style="display:none"><img id = "myImage" src = "/images/logo.png"></div><br> <body onload="setTimeout('delayer()', 8000)">
-
Thank you both I've done it like this, but it is not working: <script type="text/javascript"> <!-- function delayer(){ function show() { document.getElementById("myDiv").style.display="block"; setTimeout("hide()", 5000); // 5 seconds } function hide() { document.getElementById("myDiv").style.display="none"; } } <body onload="setTimeout('delayer()', 8000)"> //--> </script>
-
Hello I have this code which shows an image for 5 seconds then it disapears However, instead of clicking a button, I want this to happen automatically 8 seconds after page load <input type = "button" value = "Show image for 5 seconds" onclick = "show()"><br><br> <div id = "myDiv" style="display:none"><img id = "myImage" src = "/images/logo.png"></div><br> <script type = "text/javascript"> function show() { document.getElementById("myDiv").style.display="block"; setTimeout("hide()", 5000); // 5 seconds } function hide() { document.getElementById("myDiv").style.display="none"; } </script> If there are any experts out there, please provide code
-
ohhhh, ok ok, i get it, thank you for information By the way, what manual page? I thought you meant the link you are giving me where is this manual page you talking about?
-
Thank you for the information, I thought the problem is solved :-\ I really loved this split function!!! I tried using parse_url() is giving me the whole thing v=ruJ1uFf9hy4&feature=g-vrec If you have some free time, why not share script, and I will do a favor back to you
-
I never understood the PHP versions and packs, I use all PHP codes and they always work, never got an error message telling me this PHP code is too old. So you mean this script will not work in the future?
-
Really? Why is it discouraged? It is amazing, the script i posted is doing the job, please explain!
-
$a = "http://www.youtube.com/watch?v=ruJ1uFf9hy4&feature=g-vrec"; $a = split('[=&]', $a); echo $a[1];
-
Thank you Jessica But your result is >>>>>>>>>>> =ruJ1uFf9hy4&feature=g-vrec I want this >>>>>>>>>>>>>> ruJ1uFf9hy4 Moderator, why not share the script, you sound like an expert
-
Hello, I am trying to extract some letters from a Youtube URL I want to extract the letters between '=' and '&' Which are 'ruJ1uFf9hy4' The code I have does not do the whole job :-\ $string = "http://www.youtube.com/watch?v=ruJ1uFf9hy4&feature=g-vrec"; $result = substr($string, 0, strpos($string, "=")); echo "$result"; /// Will echo http://www.youtube.com/watch?v Please give code!
-
Hello. Can you tell how to obtain the Day from the Date My Date format is as follows: Y-m-d I created a code, but it gives me the year... $date = date("Y-m-d"); $get_day = strtok($date, "-"); print"$get_day"; Programming is not my skill
-
Thank you so much. Yesssss, this is so simple, I knew it exists somewhere $q = "SELECT * FROM info WHERE MATCH ( interests ) AGAINST ('$search_term')"; $res = @mysql_query($q); while($r = @mysql_fetch_array($res)) { }
-
Yes, probably you will have to save each product ID as a new Cookie. If you don't want many Cookies, jut update same Cookie, and then, explode the Cookie when the buyer is done shopping. It is easy, I would rather build my own Shopping cart than download a ready one, but that is me!
-
I always wanted to create a shopping cart for my website, however, i lost enthusiasm when I've seen amazing shopping carts from other websites. You click on a product, and you get small animations, showing you they've been added to your cart, and so on. I am a noobie, and this is too much for me.
-
Hello. I have a table which is called [info], I store my members information there. Inside this table, there is a row called [interests] which contains all the members’ interests. I am creating a search tool & I wish MySQL to match as many keywords as possible. So if the user searches for: LOVE TO GO OUT AND HAVE COFFEE mySQL will display the member who has as many keywords of this search term as possible These quires search for exact terms only… $q = "SELECT * FROM info WHERE interests LIKE '%{$search_term}%' ORDER BY RAND() "; $q = "SELECT * FROM info WHERE interests = ‘$search_term' ORDER BY RAND() "; I need a MySQL query which will match as many keywords as possible and order the results according to most matching. Is this possible? Or is it a complicated story? Help please.
-
Done a good job there Thank you for the support
-
<?php $message = " hi ' bye sup ' hi "; $message2 = str_replace(' ' ', ' . ', $message); print"$message2"; ?> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/deltacar/public_html/try.php on line 3
-
Im trying to rermove ' symbol from a string. $string2 = str_replace(" ' ", " . ", $string1); give errors How else could i do this?
-
Oops, thanks for telling me about file permissions, I will change it tommorow for sure. I am on my mobile now, cant check the code you given me Mabis, will work on it tommorow. Cheers for replies. If someone has a different way to do it, please share.
-
Hello! I have a small question... I used to upload all my member's images in same directory, but now i've decided to put 1000 images in each directory <?php $ID = $get_member_id_from_mySQL; if($ID >=0 AND $ID <=1000 ){ $directory_name='from0to1000'; } else if($ID >=1001 AND $ID <=2000 ){ $directory_name='from1001to2000'; } else if($ID >=2001 AND $ID <=3000 ){ $directory_name='from2001to3000'; } else if($ID >=3001 AND $ID <=4000 ){ $directory_name='from3001to4000'; } if(is_dir($directory_name)){ imagejpeg( $tmp_img, "{$directory_name}{$image_name}" ); }else{ mkdir("/path/to/my/$directory_name", 7777); imagejpeg( $tmp_img, "{$directory_name}{$image_name}" ); } ?> Is there any simpler way to continue with the IF function? Because I can't do this until 1000000 ?
-
Hello Sorry, what I meant is, do I have to upload the php script in same directory where the image will be uploaded Because when i ask the script to upload the image 2 directories deep, it does not work