redbullmarky
Staff Alumni-
Posts
2,863 -
Joined
-
Last visited
Never
Everything posted by redbullmarky
-
session.auto_start can be set via [url=http://uk2.php.net/ini_set]ini_set[/url]. allow_url_fopen, i believe, can only be set by changing the php.ini file itself, though it's worth a try using the same method or via the use of a .htaccess file
-
it'd be worth trying out [url=http://uk2.php.net/manual/en/function.set-include-path.php]set_include_path[/url] to include the /usr/share/pear/HTML path, as .:/usr/share/pear/HTML isnt a valid path in itself. the colon ( : ) is a seperator for all of the allowed paths. the dot before signifies the current directory. so in effect, if the include_path is set to .:/usr/share/pear, what it's basically saying is "when including a file, look in either the current directory or the usr/share/pear directory. add the /usr/share/pear/HTML like this: [code] <?php set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pear/HTML'); ?> [/code]
-
you dont need to do anything special. if you accept HTML in a textarea, then just picking it up from $_POST and echoing it is enough: [code] <?php echo $_POST['mytextarea']; ?> <form name="myform" action="" method="post"> <textarea name="mytextarea><img src="fdf"></textarea> <input type="submit value="submit!" /> </form> [/code]
-
http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
-
sure - but also in your php.ini file, have you got display_errors turned on?
-
take a look here: http://www.sxc.hu/ plenty of free photos (you can specifically search for the freely usable ones). just check the licence, etc and it'll tell you whether free, free for non profit, etc
-
change the setting in the PHP ini file. i believe that files are checked firstly to make sure the file is essentially valid PHP - ie, no parse errors, etc. only THEN is it run. so if you have parse errors like this, then the ini_set line, etc, wont even get run. you need to either set up a .htaccess in your web root changing the error_reporting / display_errors settings, or change them directly in the php.ini file. cheers
-
ok, so eliminating GeSHI for being too complex, and php's tokenizer for being PHP-only, it's regex all the way...
-
check your PM's
-
did you check the problem i mentioned earlier?
-
got a browser with google? locked
-
[quote author=businessman332211 link=topic=122155.msg503432#msg503432 date=1168632640] ??? Very, very funny. [/quote] dude, it wasnt a joke, nor was it a stab. you want to learn codeigniter? OOP? MVC? and you want a PIM too, that's very specific to your needs? for free? then what's stopping you? at its most basic, this is possibly a full day or two's work, plus maybe a day or two to get to grips with the new framework, etc. so practically, by mid next week, not only will you have written your first full application in a new framework, and hence learned enough to get a job done, but you'll also have a PIM that works exactly how you want it. if you've got the time to learn so much, and ask tonnes of questions, etc, then you'll have the time to do it - and you may actually find you learn MORE. I'd agree normally with Neal on this one, but taking your other questions into account, doing your own could be a very good way to go. just a thought...
-
and you could use codeigniter or cakephp to do it ;)
-
during this "information overload", did you also forget that you asked this question not so long back? ;)
-
shouldnt you also use [url=http://www.php.net/rand]rand[/url] rather than 'random' ? or have you got a custom function called 'random' ?
-
thanks to you to. if i hadn't gone looking further, i wouldnt have found [url=http://www.php.net/preg_replace_callback]preg_replace_callback[/url] which has just saved me a HELL of a lot of time and effort on something else ;) cheers
-
take a look at the user comments at the bottom of the [url=http://www.php.net/eval]eval manual page[/url]. it seems that using a mixure of eval, regular expressions and callbacks, you can achieve pretty much what you're after. cheers
-
looking through the MSDN site that article links to, the list of stuff omitted is quite tragic. You do have to wonder though why, considering their IE7 engine is tonnes better, they revert to the bucket of crap thats bundled with a pretty otherwise decent product. Did not of the MS developers kinda click when the question was asked: "hmm, shall we use our word processor's engine or our web browser's engine for rendering HTML emails?". daft buggers. if anything, i hope it makes people shift to alternatives like Thunderbird or just stick on old version of Outlook. It'll be there fault if they lose as many users as they have with their browser.
-
[quote author=taith link=topic=122137.msg503333#msg503333 date=1168626510] no... &&/|| works just as well as AND/OR [/quote] i stand corrected ;)
-
might be worth pointing out that, as far as I know, && is not suitable for SQL queries. You need to use AND within your query.
-
My very first PHP question: register_globals
redbullmarky replied to robbbert's topic in PHP Coding Help
doing it in the PHP.INI file would affect every site built on the server. applying register_globals as ON is highly unrecommended, so best to keep it to as few sites as possible... it'd be worth having a check for other php.ini files on your server. most of the hosts i've been with tend to have it tucked in /etc/php.ini [b]edit:[/b] failing that, in your test file, put: phpinfo() , which should reveal the path of the php.ini file that's currently being used. -
worth a look [url=http://uk.php.net/ssh]here[/url]
-
move all your php code up to the top, above the HTML. i cant see any specific reason for it to be there, so you should be fine. and you need header("Location: index.php"), not header("index.php"), followed by an 'exit' [code] <?php session_start(); @mysql_connect("localhost","allan","ah1018$") or die("Cannot Connect to DB!"); @mysql_select_db("trademymedia")or die("Cannot select DB"); $Email = $_POST["uEmail"]; $Password = $_POST["uPassword"]; $r = mysql_query("SELECT * FROM customerinfo WHERE Email = '".$Email."' AND Password = '".$Password."'"); if(!$r) { $err=mysql_error(); print $err; exit();} if(mysql_affected_rows()==0){ $_SESSION['in'] = 0; } else { $_SESSION['in'] = 1; header("Location: index.php"); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>CheckLogin</title> </head> <body> </body> </html>[/code]
-
[url=http://www.php.net/header]header[/url] as long as nothing has been output to the browser previously, then this should work: [code] <?php header("Location: /login.php"); exit; ?> [/code] using header alone like this does not IMMEDIATELY redirect, hence my 'exit' the line after. cheers
-
[url=http://www.php.net/eval]eval[/url] should do the trick. [b]edit[/b]: php.net main site down at the mo by the looks of things, so try [url=http://uk.php.net/eval]here[/url] cheers