Jump to content

xsist10

Members
  • Posts

    114
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.phparchives.za.org

Profile Information

  • Gender
    Not Telling

xsist10's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Asterisk VOIP: Linux Load Balancing Server: Linux File Sharing Server: Linux Network Administration: Linux Web Servers: Linux Development Machine: Linux I'm an Open PC
  2. Eclipse is pretty good too and comes with a number of plugins (like FTP, SVN and CVS support)
  3. Have you considered not? A number of companies now base their purchases on the ability to tinker with a product to integrate it into their own systems. Encoding the software and managing license will just end up giving you a headache and costing you more than you would by the additional sales you may have made off people who buy the product.
  4. Are you storing a datetime field or a timestamp field? If so you can select on that. SELECT [fields] FROM [table] WHERE [datetime_field] > NOW() - INTERVAL 24 HOUR ORDER BY [datetime_field]; If not then you're out of luck. You could potentially look at your bin logs but it would be much easier to just add a field.
  5. hyphens in a URL is completely acceptable. See http://www.w3.org/Addressing/URL/uri-spec.html for the full URI specification.
  6. You can layer another transparent div over your entire background which will prevent people getting image properties when hovering over the background. That or move to browsers that support CSS 3 exclusively.... (i.e.: burn IE and be done with it). <div id="bg"><img src="/site/background.png" width="100%" height="100%" alt=""></div> <div id="bg-layer"></div> <div id="content"><p></p></div> ... <style type="text/css"> /* pushes the page to the full capacity of the viewing area */ html {height:100%;} body {height:100%; margin:0; padding:0;} /* prepares the background image to full capacity of the viewing area */ #bg, #bg-layer {position:fixed; top:0; left:0; width:100%; height:100%;} #bg-layer {z-index: 1;} /* places the content ontop of the background image */ #content {position:relative; z-index:2;} </style>
  7. Brush up on the following studies as these will be things they will ask in an interview: Data Structures http://en.wikipedia.org/wiki/Data_structure Object Orientated Programming http://en.wikipedia.org/wiki/Object-oriented_programming Debugging Practices http://en.wikipedia.org/wiki/Debugging Software Development Processes http://en.wikipedia.org/wiki/Software_development_process Interviewed by a programmer: If you're interviewed by another programmer, your questions will be on technical related items. You'll probably be asked to do a couple of simple examples to show your knowledge of PHP. e.g.: Without using a for or foreach loop, write out all the letters of the alphabet (comma seperated). Interviewed my management: If you're interviewed by management of some form, your credentials and confidence will be a bigger feature. More reading: http://www.google.co.za/search?q=programmer+interview+questions
  8. The example on this page should help you. http://us.php.net/manual/en/function.ziparchive-getstream.php
  9. Firstly you are inserting a new record with just a grade and no stu_id. Also please escape all user input (use mysql_real_escape_string() if in doubt or cast to int if you know the value must be an integer). "INSERT INTO grade (grade, stu_id, cours_num) VALUES ('". mysql_real_escape_string($_POST[grade]) ."', '". mysql_real_escape_string($_POST[stu_id]) ."', '". mysql_real_escape_string($_POST[cours_num]) ."')"; You can also use MySQL's built in ON DUPLICATE option to save yourself some time. http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
  10. Change session_start(); $_SESSION["captchika"] = rand(100,999); $_SESSION["datika"] = getenv("REMOTE_ADDR"); if(isset($_POST['ptitle'])){ if(addslashes($_POST["captcha"]) != session_regenerate_id($_SESSION["captchika"], ENT_QUOTES)){die("You left some fields empty!");} elseif((!empty($_POST['ptitle'])) && (!empty($_POST['pcontent'])) && (!empty($_POST['pcategory']))){ if(mysql_query("INSERT INTO posts (ptitle,pcontent,pcategory,pdate) VALUES ('".addslashes($_POST['ptitle'])."','".addslashes($_POST['pcontent'])."','".addslashes($_POST['pcategory'])."','".$_SESSION["datika"]."')")){echo" Posted! ";} //header("Location: ".$site_path.""); }else{echo"You have entered the wrong number!";} } echo '<br /><form method="post"> Title:<br /> <input type="text" size="50" name="ptitle" /> <button type="submit">Post</button><br /><br /> Category:<br /> <select name="pcategory"> <option value="Chat">Chat</option> <option value="Help">Help</option> <option value="Tutorial">Tutorial</option> <option value="BuySell">BuySell</option> <option value="Request">Request</option> </select><br /><br /> Content:<br /> <textarea name="pcontent" cols="50" rows="7"></textarea><br /> Enter This Number: '.$_SESSION["captchika"].' <input type="text" name="captcha" /><br /> </form><br />'; to session_start(); if(isset($_POST['ptitle'])){ if(addslashes($_POST["captcha"]) != session_regenerate_id($_SESSION["captchika"], ENT_QUOTES)){die("You left some fields empty!");} elseif((!empty($_POST['ptitle'])) && (!empty($_POST['pcontent'])) && (!empty($_POST['pcategory']))){ if(mysql_query("INSERT INTO posts (ptitle,pcontent,pcategory,pdate) VALUES ('".addslashes($_POST['ptitle'])."','".addslashes($_POST['pcontent'])."','".addslashes($_POST['pcategory'])."','".$_SESSION["datika"]."')")){echo" Posted! ";} //header("Location: ".$site_path.""); }else{echo"You have entered the wrong number!";} } $_SESSION["captchika"] = rand(100,999); $_SESSION["datika"] = getenv("REMOTE_ADDR"); echo '<br /><form method="post"> Title:<br /> <input type="text" size="50" name="ptitle" /> <button type="submit">Post</button><br /><br /> Category:<br /> <select name="pcategory"> <option value="Chat">Chat</option> <option value="Help">Help</option> <option value="Tutorial">Tutorial</option> <option value="BuySell">BuySell</option> <option value="Request">Request</option> </select><br /><br /> Content:<br /> <textarea name="pcontent" cols="50" rows="7"></textarea><br /> Enter This Number: '.$_SESSION["captchika"].' <input type="text" name="captcha" /><br /> </form><br />';
  11. Then just change the GROUP to use the forum id on the forum table and use an IF_NULL to populate the topic fields [edit: and use a LEFT JOIN]. e.g.: SELECT [Fields ... ], IFNULL(t.subject, 'No topics found') FROM forumforums f LEFT JOIN forumtopics t ON (f.id = t.forumid) GROUP BY f.id ORDER BY t.replytime DESC
  12. Try this [from www.php.net/uniqid] $key = md5(uniqid(mt_rand(), true));
  13. Have you tried grouping on the ForumId. That might give you the result you want. Try this: SELECT [Fields] FROM forumforums f JOIN forumtopics t ON (f.id=t.forumid) GROUP BY t.forumid ORDER BY t.replytime DESC
×
×
  • 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.