Jump to content

sasa

Staff Alumni
  • Posts

    2,804
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by sasa

  1. 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 :
  2. you must setup another php file to add property header to your image data
  3. 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
  4. try if(!preg_match('/^[0-9]*$/', $friendid)) { echo "<li>Your FriendID can only contain numbers</li>\n"; }
  5. 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'])));
  6. sasa

    Paging

    change line if ( $end > count($file) && $start < count($file)) to if ( $page > 0)
  7. $length = sqrt(pow(($_REQUEST['x2'] - $_REQUEST['x1']), 2) + pow(($_REQUEST['y2'] - $_REQUEST['y1']), 2));
  8. 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.
  9. <?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; ?>
  10. change WHERE `site`=".$site.";"; to WHERE `site`='".$site."';"; ad '
  11. $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
  12. 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 />'; ?>
  13. change line $editor=new FCKeditor('$poruka'); to $editor=new FCKeditor('poruka');
  14. $ref = getenv('HTTP_REFERER'); $ref1 = parse_url($ref); $ref = $ref1['host'];
  15. 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); ?>
  16. 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
  17. 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
  18. 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); ?>
  19. function stristr returns string or false newer return true
  20. $session_id maybe cause trouble
  21. are you shure that your query return any result? for debuging insert before return echo 'query returns ',mysql_num_rows($results), ' row';
  22. change last linr to return "Logging In... " . $id[0];
×
×
  • 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.