Search found 164 matches

by Xerpher
Thu Mar 27, 2003 7:15 am
Forum: PHP coding => General
Topic: inputs with arrays
Replies: 2
Views: 977

What exactly are you asking for? how to check if the user put something in the box? how to get the contents of the box? something else?
by Xerpher
Thu Mar 27, 2003 7:12 am
Forum: PHP coding => General
Topic: remove .jpg from results?
Replies: 1
Views: 917

If your asking for what I think your asking forum, search or just read through these forums because I answered this question VERY recently.
by Xerpher
Tue Mar 25, 2003 10:14 am
Forum: PHP coding => General
Topic: View file name
Replies: 2
Views: 1617

... or you can use the folowing: basename($HTTP_SERVER_VARS['REQUEST_URI']) Sorry to say, but thats an awful way, it will return nothing if for example the url is "http://www.terradesign.ws/". The problem with $_SERVER['PHP_SELF']; is that it returns the whole location. Do you know how to just retu...
by Xerpher
Tue Mar 25, 2003 10:03 am
Forum: PHP coding => General
Topic: populating a combo from database
Replies: 2
Views: 1111

Re: populating a combo from database

1. Would this be more efficient than hard coding the items in the HTML? 2. How would I prevent the page re- querying the database upon page refresh? In otherwords, once the combo has been populated, there is no need to populate it again. 1. It would be worse, php only compiles the data in to html t...
by Xerpher
Tue Mar 25, 2003 10:00 am
Forum: PHP coding => General
Topic: passing variables - POST or GET
Replies: 2
Views: 1036

You can only use $_POST by posting information via forms... what you could do is make a form with hidden values and then replace links with href="javascript:formname.submit()"
by Xerpher
Mon Mar 24, 2003 7:53 pm
Forum: PHP coding => General
Topic: View file name
Replies: 2
Views: 1617

$_SERVER['PHP_SELF'];
by Xerpher
Mon Mar 24, 2003 10:00 am
Forum: PHP coding => General
Topic: Running First PHP Program
Replies: 1
Views: 1120

Its basically checking to see if the url in the address bar contains "mod.php" since mod.php is the start script that would run it. If the url does not contain "mod.php" it won't work.
by Xerpher
Sun Mar 23, 2003 7:56 pm
Forum: PHP coding => General
Topic: UNLINK MULTIPLE
Replies: 8
Views: 2153

I use

substr($file, -3) != 'jpg'
by Xerpher
Sun Mar 23, 2003 6:32 pm
Forum: PHP coding => General
Topic: UNLINK MULTIPLE
Replies: 8
Views: 2153

No. == and === are different. one checks content, the second checks contents AND vartype I believe.
by Xerpher
Sun Mar 23, 2003 5:44 pm
Forum: PHP coding => General
Topic: Running First PHP Program
Replies: 1
Views: 1120

That code is a protection so that only the startup script can load that file. It is for both security and server processor power... it could cause your server to crash if there was too many undefined things in it.
by Xerpher
Sun Mar 23, 2003 5:42 pm
Forum: PHP coding => General
Topic: fopen extremely slow
Replies: 11
Views: 4121

http://www.betbrain.com/front.jsp?site=9 Loaded instantly for me, while http://www.betonsuccess.com/php/betbrainvaluebets.php Just never loaded at all (Waited 15 minutes)
by Xerpher
Sun Mar 23, 2003 5:37 pm
Forum: mySQL & php coding
Topic: php form -> mysql problem (please help!)
Replies: 2
Views: 1400

That's because your using the ancient way of calling form variables which is both a security whole and no longer works... Try this: <?php $dbh = mysql_connect ("localhost", "ascendan_cat", "paws") or die ( 'I cannot connect to the database because: ' . mysql...
by Xerpher
Sun Mar 23, 2003 5:35 pm
Forum: mySQL & php coding
Topic: more specific count() in queries
Replies: 2
Views: 1107

Give us your php code if this doesn't work (I could be wrong, I'm not the greatest at MySQL)... SELECT studentName, count(grade) FROM studentResults where grade='A' OR grade='B' ... OR grade='F' GROUP BY studentName; If you want to count() each grade seperately I'm pretty sure you need to sp...
by Xerpher
Sat Mar 22, 2003 1:59 am
Forum: Free time
Topic: c type includes
Replies: 4
Views: 2281

Using include, yes, the whole thing. Using fread() no, you can select line numbers.
by Xerpher
Fri Mar 21, 2003 12:50 pm
Forum: mySQL & php coding
Topic: php form handling ? + mysql.
Replies: 0
Views: 938

Try this... <? include("inc/dbuser.inc"); $verbinding = mysql_connect ("$DB_HOST", "$DB_USER", "$DB_PASSWORD") or die ('I cannot connect to the database.'); $opdracht = "INSERT into $tablename VALUES ( '".$_POST['username'...
by Xerpher
Thu Mar 20, 2003 6:46 pm
Forum: PHP coding => General
Topic: can't get the value of fields in a form
Replies: 7
Views: 2377

I have never heard of / used $_REQUEST, but for forms I use $_POST
by Xerpher
Thu Mar 20, 2003 10:00 am
Forum: PHP coding => General
Topic: extract HTML
Replies: 8
Views: 2340

I'm not sure how to help, I just tried that code with the html file you specified, then a php file I had and they both worked... could you maybe give more details of what you are doing specifically?
by Xerpher
Wed Mar 19, 2003 7:50 pm
Forum: PHP coding => General
Topic: extract HTML
Replies: 8
Views: 2340

No offence, but learn some basics of php. The questions you are asking are from the absolute most basic tutorials. To output the array use echo() or print()
by Xerpher
Wed Mar 19, 2003 7:48 pm
Forum: Free time
Topic: c type includes
Replies: 4
Views: 2281

use this function: include()
by Xerpher
Wed Mar 19, 2003 7:46 pm
Forum: PHP coding => Mail
Topic: Newbie Mail Question
Replies: 5
Views: 4628

Your getting these because you have E_ALL enabled in your php.ini file which shows every single error, and although not fatal, that code has errors... $headers .= "From: ".$_POST['name']."<".$_POST['email'].">\n"; $headers .= "X-Sender: <".$_POST['email'].">\n"; $headers .= "X-Mailer: PHP\n"; //mail...
by Xerpher
Wed Mar 19, 2003 4:00 pm
Forum: mySQL & php coding
Topic: Newbie - Limited results from MySQL query
Replies: 2
Views: 1449

Silly question... what code are you using? :P
by Xerpher
Wed Mar 19, 2003 9:59 am
Forum: PHP coding => General
Topic: Creating FTP upload page
Replies: 8
Views: 3646

Lol... I have Dreamweaver MX, what is it exactly you were talking about anyway?
by Xerpher
Wed Mar 19, 2003 9:30 am
Forum: PHP coding => General
Topic: filters naughty words
Replies: 2
Views: 922

I haven't actually done this before, but you'll need to use fread() to read the file and eregu() to see if the word is in your phrase, if you can't figure it out tell me and I'll whip up a sample.
by Xerpher
Wed Mar 19, 2003 8:51 am
Forum: PHP coding => General
Topic: extract HTML
Replies: 8
Views: 2340

Try fread();
by Xerpher
Wed Mar 19, 2003 8:48 am
Forum: PHP coding => General
Topic: Creating FTP upload page
Replies: 8
Views: 3646

Or you could use the freely posted code above.