
trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
mysql_query("UPDATE table SET user = '{$name}text' WHERE id = '5'");
-
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");
-
This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=320197.0
-
Form1 field to auto populate Form2 same domain
trq replied to AllenHobson's topic in PHP Coding Help
http://www.tuxradar.com/practicalphp/10/3/0 -
Cool, all sorted then.
-
Form1 field to auto populate Form2 same domain
trq replied to AllenHobson's topic in PHP Coding Help
My answer remains. Use sessions. -
Form1 field to auto populate Form2 same domain
trq replied to AllenHobson's topic in PHP Coding Help
You'll need to pass the data through the $_SESSION array or via hidden form fields. -
Have you actually added these paths to your include_path or how are you trying to include files?
-
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>
-
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.
-
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/
-
This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=320161.0
-
This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=320152.0
-
Question about Automatic MySQL Backups using Cron Jobs
trq replied to galvin's topic in Other Web Server Software
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 -
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.
-
Generally, your controller would have access to a Request object which would store all the data that comes with a users request.
-
Do you at least have a test account people can use?
-
Have you actually searched anywhere for a free WYSIWYG editor? There are literally hundreds of them.
-
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?
-
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.
-
Have you checked out some of the editors mentioned in this thread?
-
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.
-
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.
-
You'll need to be more descriptive. Your example makes little sense to me.