sasa
Staff Alumni-
Posts
2,804 -
Joined
-
Last visited
-
Days Won
1
Everything posted by sasa
-
1st i see: change line $parent = (isset($_GET['parent'])) : htmlentities(mysql_real_escape_string($_GET['parent'])) ? false; to $parent = (isset($_GET['parent'])) ? htmlentities(mysql_real_escape_string($_GET['parent'])) : false; swap ? and :
-
you must setup another php file to add property header to your image data
-
1st for setup variable values you must use one = not two (==) two == is for compare 2st remove @ in front of function and enable error reporting 3 in query "UPDATE members SET lastlogin='$lastlogindate' WHERE username='$username' LIMIT 1" you dont setup variable $lastlogindate are you have some new error
-
try if(!preg_match('/^[0-9]*$/', $friendid)) { echo "<li>Your FriendID can only contain numbers</li>\n"; }
-
can we see some code
-
change if(isset($_POST['username']) && isset($_POST['password'])) { $username = @strip_tags(stripslashes($_POST))); $password = @strip_tags(stripslashes(md5($_POST))); to if(isset($_POST['username']) && isset($_POST['password'])) { $username = @strip_tags(stripslashes($_POST['username']))); $password = @strip_tags(stripslashes(md5($_POST['password'])));
-
change line if ( $end > count($file) && $start < count($file)) to if ( $page > 0)
-
$length = sqrt(pow(($_REQUEST['x2'] - $_REQUEST['x1']), 2) + pow(($_REQUEST['y2'] - $_REQUEST['y1']), 2));
-
[SOLVED] blocking my sitemap from viewing files
sasa replied to serverman's topic in PHP Coding Help
ad tag <!-- no show --> just after </title> tag in same line change your functio to function printlink($fn){ $handle = fopen($fn, "r"); //open web page file $filestr = fread($handle, 1024); //read top part of html fclose($handle); //clos web page file if(strpos($filestr,'<!-- no show -->')) return false; $indent = depth($fn); // get indent value for ($i = 1; $i <= $indent; $i++) { echo " "; } echo "<a href=\"$fn\">"; //print url if (preg_match("/<title>.+<\/title>/i",$filestr,$title)) { //get page title echo substr($title[0], 7, strpos($title[0], '/')-; //print title etc. -
<?php $i = 01; while ($i <= 25): printf( '<div class="thumb"><a href="images/feat_%02d.jpg" class="feature">image%d</a></div>',$i,$i); $i++; endwhile; ?>
-
change WHERE `site`=".$site.";"; to WHERE `site`='".$site."';"; ad '
-
if(isset($_GET['image_cat']) && $_GET['image_subcat'])
sasa replied to DeanWhitehouse's topic in PHP Coding Help
$sub_cat = $_GET['image_subcat']; but in query `sub_folder` = '{$cat2}' ! and SELECT * FROM sub_cat WHERE `imagelink`='{$subcate}' ORDER BY RAND() LIMIT 1 betore $subcate is setup -
[SOLVED] Eval multi-dimensional array not working.
sasa replied to lws_gnam's topic in PHP Coding Help
try <?php $test3['going']['up'] = array('hello', 'test', 'world'); if (is_array($test3['going']['up'])) echo '<br />Direct call is an array<br />'; else echo '<br />Direct call is NOT an array<br />'; echo('is_array($test3' . "['going']['up']);"); eval('$x=is_array($test3' . "['going']['up']);"); if ($x) echo '<br />Eval call is an array<br />'; else echo '<br />Eval call is NOT an array<br />'; ?> -
[SOLVED] I've changed the PHP code and now it doesn't work
sasa replied to Wizard4U's topic in PHP Coding Help
change line $editor=new FCKeditor('$poruka'); to $editor=new FCKeditor('poruka'); -
$ref = getenv('HTTP_REFERER'); $ref1 = parse_url($ref); $ref = $ref1['host'];
-
try <?php $string = '<img src="test.jpg" height="200" width="300" alt="Product image">'; preg_match_all('/(\S+)="([^"]+)"/', $string, $out); $out = array_combine($out[1], $out[2]); print_r($out); ?>
-
query "SELECT `name`,Count(*) AS Count FROM `articles`" return just one data row LIMIT 3, 7 force to return rovs 4 to 10 that is empty
-
create file next.php <?php $url = $_SERVER['HTTP_REFERER']; preg_match('/\d+\.html/', $url, $a); $old_name = $a[0]; $a = explode('.',$old_name); $a[0] = sprintf('%04d', $a[0] + 1); $a = implode('.',$a); $new_link = str_replace($old_name, $a, $url); $x = parse_url($new_link); if (!file_exists($_SERVER['DOCUMENT_ROOT'].$x['path'])) $new_link = '0001.html'; header("Location: $new_link"); ?> and link <right arrow> to it
-
A query with a pattern match condition? <<ULTRA difficult Question>>
sasa replied to onedumbcoder's topic in PHP Coding Help
_ replace one caracter -
try <?php function my_parse($text){ $a = parse_url($text); parse_str($a['query'],$b); $b = array_change_key_case($b); switch ($b['fuseaction']){ case 'user.viewprofile': return 'Profile '.$b['friendid']; break; case 'bulletin.read': return 'Bulletin '.$b['messageid']; break; case 'mail.readmessage': return 'Message '.$b['messageid']; break; default: return 'hey, it doesnt match the three predefined matches, so return "blah".'; } print_r($b); } //$sometext = 'http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=000000'; //$sometext = 'http://bulletins.myspace.com/index.cfm?fuseaction=bulletin.read&authorID=000000&messageID=222222'; $sometext = 'http://messaging.myspace.com/index.cfm?fuseaction=mail.readmessage&userID=000000&type=Inbox&messageID=555555&fed=True'; echo my_parse($sometext); ?>
-
function stristr returns string or false newer return true
-
$session_id maybe cause trouble
-
are you shure that your query return any result? for debuging insert before return echo 'query returns ',mysql_num_rows($results), ' row';
-
change last linr to return "Logging In... " . $id[0];