Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. mysql_query("UPDATE table SET user = '{$name}text' WHERE id = '5'");
  2. Yes what? There is nothing there that puts any paths on your include path. How about.... <?php defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); defined('SITE_ROOT') ? null : define('SITE_ROOT', $_SERVER['DOCUMENT_ROOT']); defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.DS.'includes'); set_include_path(get_include_path() . PATH_SEPARATOR . LIB_PATH); require_once("config.php"); require_once("functions.php"); // core objects require_once("session.php"); require_once("database.php"); require_once("pagination.php"); require_once("PHPMailer".DS."class.phpmailer.php"); require_once("PHPMailer".DS."class.smtp.php"); Then instead of.... require_once("../../../includes/initialize.php"); which should have been.... require_once(LIB_PATH.DS."initialize.php"); anyway shouldn't it? You can now use.... require_once("initialize.php");
  3. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=320197.0
  4. http://www.tuxradar.com/practicalphp/10/3/0
  5. Cool, all sorted then.
  6. My answer remains. Use sessions.
  7. You'll need to pass the data through the $_SESSION array or via hidden form fields.
  8. Have you actually added these paths to your include_path or how are you trying to include files?
  9. You would need to place the id in the <option> elements value attribute or somewhere. Something like.... <option value="<?php echo $row->getId(); ?>"><?php echo $row->getName();?></option>
  10. The menu script looks like it uses mootools. This will interfere with jQuery and vice versa. See (here) for how to adjust jQuery to play nice with other frameworks.
  11. Assuming you meant on Linux because Windows is a wimp when it comes to anything to do with servers. http://library.linode.com/email/postfix/
  12. How should we know? What are you expecting the $facebook object to be? Do you have a facebook class?
  13. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=320161.0
  14. This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=320152.0
  15. So, its a php script you need to run? A few ways to do it. If you know the absolute file system path to the you should use that and execute the script via php's command line interpreter. This way you can remove it from your website so that no one can request it and execute your backup. So, to do that would look something like.... /usr/bin/php /home/yourusername/script.php This tells Bash (your shell) to execute script.php using php's cli which is usually installed into /usr/bin/php If you can't do it that way and must execute the script via your server (and therefore a url) you will need to use a program that can execute http requests. Curl or wget are your best options. /usr/bin/wget http://www.mydomain.com/script.php
  16. I never mentioned the $_POST or $_REQUEST arrays. Assuming your attempting to build around the MVC pattern, generally, this pattern gives access to (and creates) both a Request & Response object. These objects are generally available to the controller. Well, the Request object generally is, while the Response object might actually be available through the View. Having said that, it's not always necessary, it's really just a design decision.
  17. Generally, your controller would have access to a Request object which would store all the data that comes with a users request.
  18. Do you at least have a test account people can use?
  19. Have you actually searched anywhere for a free WYSIWYG editor? There are literally hundreds of them.
  20. switch ($_POST["score_" . $row['id']]) { case 1: $score = 'Low'; break; case 2: $score = 'Average'; break; case 3: $score = 'High'; break; } The bigger questions are why are you appending a users id onto the end of all your form elements? And why is this all happening within a while loop? In fact why does the SELECT exist at all?
  21. I used to use dynamically loading js, but it ended up being allot more efficient to put all js into one file and the minify it. Its the actual http requests to multiple files that hurts more than size. Of course it would also depend on what sizes where talking about. Loading a 50k-80k file just to use one function etc etc.
  22. Have you checked out some of the editors mentioned in this thread?
  23. This board is here for questions directly relating to already existing Third Party code. It is NOT a code repository or the place to post requests looking for specific scripts. If you can't find the script you are looking for on Google, you either don't know how to use Google or the specific script does not exist. DO NOT request help with searching.
  24. I'm not sure how that would be achieved through php. The rule is that you use a before words that start with a consonant sound and an before words that start with a vowel sound.
  25. You'll need to be more descriptive. Your example makes little sense to me.
×
×
  • 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.