Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. <?php if ($result = mysql_query('SELECT mode FROM settings LIMIT 1')) { if (mysql_num_rows($result)) { $row = mysql_ftech_assoc($result); if ($row['mode'] != 1) { echo "<br /><br />"; echo "<p><span style=\"margin-left:8px\">"; include "endgame.php"; echo "</td>"; } } }
  2. What exactly do mean? There is a whole series of mysql_* functions.
  3. Strings need to be surrounded by quotes in php, string indexes within an array are no different.
  4. I work alone mostly so, no. I have been to a few seminars on the topic however and have started using a few of its ideals. For instance I try and use a vague form of story for everything and plan my work into fortnightly sprints of sorts. I'm sure its different when I'm the only one doing it, but yeah, I use parts of it I guess.
  5. trq

    Database querys

    There is a tutorial on our main site that covers UNIONS & JOINS, you should read it.
  6. I DON'T APPRECIATE BEING YELLED AT!!!! Sounds like homework to me. We don't do homework.
  7. If you want the url to change you need to change the page. There are ways of placing params within a url using anchor tags which allows book markable Ajax. However, without knowing your specific Ajax implementation you likely won't get allot of help in a simple forum reply. Google 'book marks ajax' or similar and you might find a few tutorials. This is however something that really needs to be though about from the startr of your application design and could require quite a bit of reworking if youve already got a significant amount of code.
  8. Pretty vague question. I would at least start with a wish list, eventually turning that into a spec, I would then start registering Issues from the spec into some issue tracking software (preferably one that allows scrum type integration). From there I would start organizing these Issues into priorities / versions then start working on them.
  9. ! is the 'not' logical operator. @ is the error suppressor. ? : is the ternary operator.
  10. I gave you a link to the manual which describes how to execute a query. Did you look at it?
  11. Your still not being at all clear.
  12. If you want the variables to appear in the url, don't use Ajax.
  13. Correct it? Its not at all valid php, you need explain what it is your trying to do. Execute a query? See mysql_query.
  14. No its not. There is no php in the code provided.
  15. page1.php <?php session_start(); $_SESSION['var'] = 'hello'; page2.php <?php session_start(); if (isset($_SESSION['var'])) { echo $_SESSION['var']; }
  16. I would (at least) make sure to put all files that can possibly be included within a certain directory, then check for your files existence within that directory before including it. eg; function pageSwitch() { if (!$_GET['act']) { $use = "news.php"; } else { $use = $_GET['act']; } $this->file = $use; if (file_exists('includes/' . $this->file)) { ob_start(); include 'includes/' . $this->file; return ob_get_clean(); } }
  17. Sorry, but very little of that last post made any sense to me.
  18. So, at the moment then, this method simply returns the name of the file to be included? And you want it to actually return the included file? function pageSwitch() { if(!$_GET['act']) { $use = "news.php"; } else { $use = $_GET['act']; } $this->file = $use; return $this->file; } Should be.... function pageSwitch() { if (!$_GET['act']) { $use = "news.php"; } else { $use = $_GET['act']; } $this->file = $use; ob_start(); include $this->file; return ob_get_clean(); } I would be very careful giving users the ability to execute php scripts passed in via the url like that, this poses quite a few security issues.
  19. I don't see where you parse these {integrate} tags specifically.
  20. A # within a url generally represents a named anchor (used by html). However, what you see facebook and youtube using is probably customized to there particular systems. it could be used by any language.
  21. The easiest way to keep variables from page to page is probably to stick them within the $_SESSION array.
  22. Considering that is where all the work is done, it would be most helpful.
×
×
  • 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.