RE: [PHP] Using HTTP Referer

2002-09-11 Thread Craig Vincent
The problem I'm having right now is that after the user is logged in, the login.php can never send it back to the page the user came from, it will just redraw the login.php page. Obviously, $_SERVER['HTTP_REFERER'] contains the location of itself instead of the location of the page sent the user

RE: [PHP] Help needed about queries with MySQL, thanks.

2002-08-18 Thread Craig Vincent
nID = '$sessionID' Although if $sessionID contains an integer (which I assume is would) the quotes aren't needed, you never know. Some OSes are quirky. Also you may want to add an echo mysql_error(); line after your initial mysql_query to see if perhaps there's a problem

RE: [PHP] Credit Card Validation With Expiration Date

2002-07-30 Thread Craig Vincent
algorithm attached to it...as long as it is past the present date there's no way to consider it invalid without cross-referencing against a database of active cards. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
re better than ours. Thank you for pointing out the mistake Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
) It's a standard parsing error I'm getting Parse error: parse error in admin_add_player.php on line 15 Since this message does not arise when line 15 is removed I can only assume the error is actually on that line and not a missing quote or bracket somewhere else in the script.

[PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
I was happily coding when I came across a mysterious error. I've traced it to this line if ($player_password != $player_password_verify) { $errmsg .= 'Password don't match. Please try again'; $error = 1; } commented out the script runs fine, if this line is active an error is produced. My eye

RE: [PHP] how to select a file on a random basis?

2002-05-20 Thread Craig Vincent
) I'll try explaining in better detail when I'm more awake hehe. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread Craig Vincent
why the server isn't working. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
21, 41. Almost there I think, unfortunately, I need to > jet. I'll > be thinkin' on this one while DJing, definitely! Easy fix =) Put the $number = ($i * 20) + 1; at the end of your for loop so it is the last thing done prior to starting a new loop. Sincerely, Craig Vincent -- P

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
pages by 20 as well before the for loop was called which was redundantand probably would have caused problems with getting the proper results from the database depending on how you coded it. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
se two statements was that the loop would be indefinate. Without the third option $i is never incremented (unless you manually increment it from within the loop). So with your examples $i would always be 1 and would therefore always be <= $num_pages unless $num_pages was zero or negativ

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
ich I believe is what you are looking for). Note the parenthesis in the $number line are not needed however I typically code with them as it makes it easier to understand the code with less though =) Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and MySQL

2002-05-17 Thread Craig Vincent
ly abuse her MySQL server due to her post =) Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and MySQL

2002-05-16 Thread Craig Vincent
our problem as well. I think you were aiming for something like if ($booktitle AND $quantity) { or how I do it (although it looks a bit messier) if (($booktitle) && ($quantity)) { Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and MySQL

2002-05-16 Thread Craig Vincent
k-quantity' WHERE booktitle='$booktitle' AND quantity=quantity"; mysql_query($sql); } Should do the trick. Or even cleaner if( $booktitle AND "quantity" ){ mysql_query("UPDATE Book2 SET stock ='$stock-quantity' WHERE booktitle='$booktitle' AND quantity=quantity"); } Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] is $HTTP_REFERER worth trusting?

2002-05-16 Thread Craig Vincent
ng you can do is temporarily record the IPs of connections to your script, and then block IPs that connect to the script too often directly from your routing table. It doesn't necessarily stop those using proxies but definately is more reliable than an HTTP_REFERER protection scheme. Sinc

RE: [PHP] newbie bigtime

2002-05-15 Thread Craig Vincent
browser. There are advantages and disadvantages to both but neither of which have the advantage of security. IMO POST is better to use generally since it presents much cleaner URLs to the end user, but I find the GET method much better when debugging a script designed to process a form submission.

RE: [PHP] PHP and mySQL

2002-05-14 Thread Craig Vincent
, just the MySQL server trying to execute the query). Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and mySQL

2002-05-14 Thread Craig Vincent
uspect you meant quantity=$quantity (again if it's not an integer you need single quotesheck put single quotes around it anyways...it doesn't hurt) $sql = "UPDATE Book2 SET stock ='$stock-quantity' WHERE booktitle='$booktitle' AND quantity='$quantity'&

RE: [PHP] Self Destruct code

2002-05-07 Thread Craig Vincent
gly urge you to get a deposit for any projects you're going to work on. Such a retainer is perfectly acceptable in a circumstance like thisand it protects you from companies deciding to terminate a project mid-development (or if they don't pay you, you at least get somethin

RE: [PHP] Linux and permissions

2002-05-06 Thread Craig Vincent
php directory *and* copy the files. It means that DirectoryIndexing is enabled in apache =) you can either disable that (recommended) or as a quick fix put a blank index.htm (or .html file) in that directory so when someone calls up just the directory they get that blank page. Sincerely, Craig Vincent --

RE: [PHP] arithimetic

2002-05-02 Thread Craig Vincent
please? It may help shed some light on your situation. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Stupid question

2002-05-02 Thread Craig Vincent
ints use the round() function. However if you don't want to round and instead just want to truncate the number, the number_format() function would be what you need. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Opinions Wanted

2002-05-02 Thread Craig Vincent
it if a person refreshes the page or returns to that page using the forward/back navigation buttons on their browser. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] variables over 2 pages w/ a table.

2002-05-01 Thread Craig Vincent
ile on your system. There's an exact example of this on http://www.php.net/manual/en/function.include.php example 11-5. Basically you need the include to be an http link...not a local link ex. include("http://www.foobar.com/index.php?lext=php?start=8";); Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Kinda HTML and PHP question....

2002-05-01 Thread Craig Vincent
t; tables get wight bigger..they are set to wight=100% . thanks for > any help or any suggestion what should i do. http://www.php.net/manual/en/function.wordwrap.php This I think is exactly what you're looking for. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php

RE: [PHP] Session Initially Does Work

2002-05-01 Thread Craig Vincent
n name goesyou actually don't need to specify oneby default the session name is PHPSESSION and really unless you have a real reason for using a different session name there is no real benefit to specifying another session name (afaik). Sincerely, Craig Vincent -- PHP General Mailing List

RE: [PHP] Session Initially Does Work

2002-05-01 Thread Craig Vincent
MOTE_USER to equal the apache authentication username easiest method (for me anyways) is: $REMOTE_USER = getenv('REMOTE_USER'); Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Session Initially Does Work

2002-05-01 Thread Craig Vincent
are created so say you create the cookie on page A, until the user refreshes page A or goes to page B the cookie won't actually be in effect. A snippet of your code would be helpful as well Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] getting a function name of the calling function

2002-05-01 Thread Craig Vincent
pass the name of a parent function to a child function. However you could always pass the parent function's name to the child function as a normal parameter. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Query > Close

2002-05-01 Thread Craig Vincent
7;ll sleep better at night using mysql_close() =) Really the question to ask is why shouldn't you use mysql_close()? Overall it is better for your system and relieves you of worrying about any potential memory hogging or MySQL connection rejections. Sincerely, Craig Vincent -- PHP General

RE: [PHP] PHP Editors

2002-05-01 Thread Craig Vincent
now I'm hooked on TextPad. Let us know if you have any > experience using Dreamweaver MX. I don't know about thatI've used Dreamweaver Ultradev for years and it worked great for my PHP/HTML coding. I haven't tried MX but am curious as to how it may work. S

RE: [PHP] Checkbox Initial Value based on record in db

2002-05-01 Thread Craig Vincent
rkto have a checkbox autochecked the HTML must be similar to So a sample coding might be > Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] $PHP_AUTH_USER

2002-04-20 Thread Craig Vincent
#x27;t find my notes so I can't give you an exact answerhowever if I remember correctly by sending a 401 error header to the user when they log out it will force the browser to re-request authentication Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] php permissions

2002-04-19 Thread Craig Vincent
io if your admin has done his job properly is one could manage to erase all the other php uploaded files if they found an exploit. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] creating table help

2002-04-19 Thread Craig Vincent
elping to resolve your issues. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] problem when my php forum tries to send a mail

2002-04-19 Thread Craig Vincent
forums here for phpBB. You may want to search here to see if there have been others with a similar problem. My guess would be that you don't have an smtp setup on win 98. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] some problems about gd in php

2002-04-19 Thread Craig Vincent
sr/local/mysql > --with-apache=../apache_1.3.24 --enable-track-vars > --with-gd=../gd-1.8.4 --with-png-dir=../libpng --with-zlib-dir=../zlib What version of PHP are you using? Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variables Limit

2002-01-26 Thread Craig Vincent
s. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] database question

2001-11-29 Thread Craig Vincent
> what does \S means? http://www.php.net/manual/en/pcre.pattern.syntax.php This page gives a good description of many of the regex metacharacters and their meanings. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: [PHP] Why doesn't this work? HTTP_USER_AGENT

2001-11-26 Thread Craig Vincent
code at all. What version of PHP are you using? Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Selecting databases

2001-11-26 Thread Craig Vincent
ppropriate database...of course this format is assuming that all the table names will be identical, although if you do have different table names for each database it's very easy to change that dynamically as well. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Which 'make' is needed for linux to install php?

2001-11-26 Thread Craig Vincent
make (Linux slackware and redhat) and have never had a problem with any version of PHP (3.x or 4.x) Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list admin

RE: [PHP] not null

2001-08-01 Thread Craig Vincent
hing in $value. Are you referring to the (INT, NOT NULL, PRIMARY) field being in a database? Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

RE: [PHP] check if user exists

2001-08-01 Thread Craig Vincent
if (mysql_num_rows(mysql_query("SELECT uname FROM users WHERE uname = '$username@$domain'")) > 0) { return("Username already exists.\n"; } That should work for you. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-m

RE: [PHP] Security and Cookies

2001-07-11 Thread Craig Vincent
e best solution is to move the admin files to an area a normal individual could access... (ie another domain or subfolder protected by username/password, or IP or both). Sincerely, Craig Vincent -Original Message- From: Steph [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 200

RE: [PHP] function to complete strings with white spaces on the left

2001-05-21 Thread Craig Vincent
untested! The reason for the if statement is that str_repeat will produce an error if 17-strlen($word) <= 0 and that'll break your scriptof course you could remove the if state if you're positive the # of characters in $word never exceeds 16. Sincerely, Craig Vincent --

RE: [PHP] select the max value

2001-05-21 Thread Craig Vincent
SELECT MAX(scorevalue) FROM score Will display the maximum value of your scorevalue column. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

[PHP] Problem using unpack

2001-05-20 Thread Craig Vincent
roblem would be much appreciated =) I've been plagued with this problem for a few days now and I'm having no luck =/ Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

RE: [PHP] mail() problem

2001-05-19 Thread Craig Vincent
000 - 1500 individual emails per minute with minimal resources consumed on the system so a solution of this nature more than likely will work out in your favor. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

RE: [PHP] hosting "closed" web application for multiple users

2001-05-19 Thread Craig Vincent
ional features but I would consider it well worth it to a company rather than spending countless tech hours and security testing to prevent the source from being viewed. http://www.zend.com Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [