Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. I still don't understand. You can use most package manager from a terminal and they all allow you to install whatever individual extensions you need for php without having to install them all. There also a hell of allot easier to maintain than doing it yourself. I understand there are at times certain reasons while compiling from source is a better option, the reasons you have given however don't really apply.
  2. Is there a particular reason your installing from source and not using a package manager?
  3. Instead of simply assuming the query worked.... $result = mysql_query($sql); Print "Congratulations! You are now a registered member on yourwebsite.com!"; You should check and see.... if (mysql_query($sql)) { if (mysql_affected_rows()) { print "Congratulations! You are now a registered member on yourwebsite.com!"; } else { trigger_error('Query failed <br />' . mysql_error() . '<br />' . $sql); } }
  4. Your server must have magic_quotes enabled. You should disable this if you have acess, otherwise, you'll need to use stripslashes.
  5. Sounds like your looking for: http://www.phpdoc.org/
  6. You need to stop trying to find specific tutorials, learn some basics and then start actually *thinking* about how problems might be solved. Lets pretend that you already knew how to retrieve data from a database and display it on a web page. Is it really that far of a stretch to think about how that data might be displayed within a form? There is a good book in my signature (Hudzilla) that if read from beginning to end will give you a pretty good grasp of the language, from there, it's just learning to think like a programmer instead of constantly seeking out tutorials.
  7. trq

    MOVED: E-MAIL

    This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=323108.0
  8. Have you got access to a shell? If so, just go to the directory where the script resides then issue the pwd command, this will print the path. From here, it looks like its in your home directory. /home/username/col_protected You should also move your script into your home directory.
  9. Form1.HTML would need to be a php page but otherwise, yes.
  10. This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=323045.0
  11. I wouldn't think soap would require an entire book dedicated to the subject.
  12. You need to use absolute file paths in scripts executing from cron. Either the or change the working directory to the same one the script resides within.
  13. There is nothing wrong with the include construct, and using it as described is one of its intended uses. Your original example however uses a variable as input to the include construct. I was saying it is not safe to rely on user input to determine what file 'include' actually includes.
  14. Indeed. I always forget echo accepts more than one argument.
  15. The concatination operator is . not , Why don't you try some code instead of wasting your time wondering?
  16. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=323087.0
  17. Obviously your clinet picked the wrong person to ask then. Without understanding your clients exacting requirements, every option would just be opinion. I suggest you let this one go to someone with a little more experience.
  18. You set it up exacly the same as you did for the first site, but use the configuration panels available at the top of the website tree. This is where all global configurations go.
  19. Firstly, it is very insecure to blindly include a file like that. You really should validate that it is indeed a file that exists, and also one that you want to include. Secondly, is this the exact code you are using? The error suggests that it is trying to include a file called page.php. Are you sure you have double quotes around $page.php Thirdly, $page is not actually defined anywhere. Register globals have been off by default for security reasons for over 8 years. You should be using $_GET['page'] instead. I would be more inclined to replace this.... <?php include("$page.php"); ?> with.... <?php $valid = array('home','about','whatever'); // a list of valid files. if (in_array($_GET['page'], $valid)) { include $_GET['page'] . '.php'; } ?>
  20. To get the functionality your require you are likely going to need to implement if statements within your template parser. this is why template engines are so inefficient. Your basically creating a mini programming language. Can I ask you why you think using something like..... <div class="foo">{FOO}</div> Is a better option than using something like..... <div class="foo"><?=$foo?></div> ? The second option is far more flexible & efficient because it uses native PHP. Either way a designer is going to need to learn some new syntax, you may as well have them learn some basic PHP which is (by the way) also already well documented. If you think using a template engine separates code from markup you misunderstand the concept.
  21. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=323073.0
  22. MVC has nothing at all to do with how your application handles languages, I'm not sure I understand your issue.
×
×
  • 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.