dreamwest
-
Posts
1,223 -
Joined
-
Last visited
Never
Posts posted by dreamwest
-
-
Thanks!
-
Im inserting a new row into a table, but is there a way i can get that id of that row without reselecting it
-
Im trying to get a number to represent a date name
date('F'); // january
date('n'); //january = 1
So
01 = January
02 = Feburary
etc...
$mth = 02; $mth_name= ; //convert numeric to month name echo $mh_name; // Feburary
-
It wont work, i have a varying number of deliminators
-
Ive stored a string in the database with deliminators "|" now how can i seperate the string and add extra info to it
String:
Sam Neill|William H. Macy|Tea Leoni|
What i need:
<a href='/Movies/&actor=Sam Neill'>Sam Neill</a> <a href='/Movies/&actor=William H. Macy'>William H. Macy</a> <a href='/Movies/&actor=Tea Leoni'>Tea Leoni</a>
-
Sweet! Thanks
-
mysql_query("SELECT * FROM main WHERE MATCH name AGAINST('{$q}') ")
-
I have 2 foreach loops and need to concat the 2nd loop
foreach ($c as $a) { //sentences (loops 10 times) foreach ($d[1] as $e) {//words (loops up to 6 times) $cast .= trim($e)."|"; } echo " Cast: {$cast}<br>"; }//end foreach
Basically this keep concating the first loop as well
eg.
1st loop:
Cast: Gary Cooper|Basil Rathbone|
2nd loop:
Cast: Gary Cooper|Basil Rathbone|Errol Flynn|Olivia de Havilland|
3rd loop:
Cast: Gary Cooper|Basil Rathbone|Errol Flynn|Olivia de Havilland|Nikolai Cherkasov|
etc...
What it should be is:
1st loop:
Cast: Gary Cooper|Basil Rathbone|
2nd loop:
Cast: Errol Flynn|Olivia de Havilland|
3rd loop:
Cast: Nikolai Cherkasov|
-
$src = file_get_contents('http://folding.extremeoverclocking.com/user_summary.php?s=&u=454083'); preg_match_all('~<td align\s?=\s?[\'"]right[\'"]>(.*?)</td>~is', $src, $c); foreach ($c[1] as $a) { echo "{$a}"; }
-
I have a list of movies, but i need to add some info to the beginning of each line:
Notorious Fox Searchlight Pictures Dir., George Tillman Jr.; Cast, Jamal Woolard, Angela Bassett, Derek Luke, Antonique Smith, Anthony Mackie, Naturi Naughton, Sean Ringgold, Marc Jon Jefferies Paul Blart: Mall Cop Columbia Dir., Steve Carr; Cast, Kevin James, Jayma Mays, Shirley Knight
What i need to do is split each block up into lines and add additional info to them
Movie: Notorious Studio: Fox Searchlight Pictures Cast: Dir., George Tillman Jr.; Cast, Jamal Woolard, Angela Bassett, Derek Luke, Antonique Smith, Anthony Mackie, Naturi Naughton, Sean Ringgold, Marc Jon Jefferies Movie: Paul Blart: Mall Cop Studio: Columbia Cast: Dir., Steve Carr; Cast, Kevin James, Jayma Mays, Shirley Knight
There are always to blank lines in between each paragraph
-
It should be
$words = array('murmer', 'frog', 'bat'); // commas are deliminators aka seperators
-
var iframe = document.createElement("iframe"); iframe.setAttribute("id","ajax-temp"); iframe.setAttribute("name","ajax-temp"); iframe.setAttribute("width","0"); iframe.setAttribute("height","0"); iframe.setAttribute("border","0"); iframe.setAttribute("style","width: 0; height: 0; border: none;"); form.parentNode.appendChild(iframe); window.frames['ajax-temp'].name="ajax-temp";
-
!Apparently! you cant upload a file by ajax, but the link i gave you uses a javascript iframe. The functionality is identical to ajax
-
-
Already thought of that - ill just amend a secret code to it
eg:
$encrypt = "mary had a little lamb *check valid*";
Then str_replace the *check valid* on the decrypted side
-
$post = $_POST['comments']; if (!$post){ header("Location: http://site.com/mysite.html"); exit(); }
-
I want to pass a title through $_GET, but i need to encrypt it so no one can alter the title as they are stored in a database
Encrypt the link:
$encrypt = "mary had a little lamb"; //encrypt this $link = "http://site.com/index.php?title={$encrypt}";
Link (what the viewer sees) :
http://site.com/index.php?title=656gyifhkbu+_tr6$fhjgfjhgjkg
play.php:
$title = $_GET['title']; //decrypt this so it is the original string "mary had a little lamb"
-
i got 2 right on that game!
-
cz tunes...It gets my fanny wet
and kewd remix
-
if you have an image url:
Just parse the url and curl the site
$img_url = "http://www.phpfreaks.com/media/images/forums/logo.png"; $url = parse_url($img_url); $u = "http://".$url['host']; $ch = curl_init($u); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; da; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 15); $str = curl_exec($ch); curl_close($ch); if ($str === false) { echo "cURL failed "; die(); } echo "<img src='{$img_url}'><hr>This image found here!<hr>"; echo $str;
-
So you have 2 paths - the url (which is dynamic):
http://www.google.com/one_level_up/2_levels_up/3levels_up/
or
http://www.google.com/one_level_up/2_levels_up/
or
http://www.google.com/one_level_up/
and the path (which is also dynamic):
../../intl/en/images/logo.gif
So what your lookig for is the full image url ?? eg..
http://www.google.com/one_level_up/2_levels_up/intl/en/images/logo.gif
-
-
-
How can i use a variable within preg_match_all??
$img = "fun.jpg"; preg_match_all('~[\'"](.*?)".$img."[\'"]~is', $str, $a);
select distinct values from multiple tables
in MySQL Help
Posted
Grouping is important when select * distinct
Otherwise try this assumed method: