[PHP] RegEx for a URL?

2003-03-06 Thread Jason Murray
st. If anyone's interested, the board system itself is up and running on my dev/test server at http://boards.shadow.net.au - you can see a live version at http://www.auswrestling.com/forum/ and also at http://www.game-spin.com/forums/. I'll be releasing it soon, and if someone can give me a working UR

RE: [PHP] random -n lines array problem

2003-03-06 Thread Jason Murray
> You need to explode() $line. Won't that still cause problems for him, since explode() will ignore concurrent separators ()? Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] random -n lines array problem

2003-03-06 Thread Jason Murray
> Where do you get that from? Probably from not trying it before I open my mouth. I must have dreamed it somewhere, sorry :) J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MYSQL :(

2003-03-06 Thread Jason Murray
> How can I get this to use the next auto_increment of > id (Next Autoindex = 52)? What if you just remove id from your field list? insert into ccl.ccl_maintest (id,RNum,YR,AU,ST ^^^ Here :) (Just an idea...) J -- PHP General Mailing

RE: [PHP] BIG include file !!!

2001-01-10 Thread Jason Murray
iles containing functions etc in each page and it's performing nicely. Depending on the server, the included files should end up cached anyway. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/

[PHP] Matching specific HTML tags with a regex

2001-01-10 Thread Jason Murray
ot; and "text here". (Why do I want to do this? To convert the style sheet into tags... its neccessary, if ugly. :\). Any help would be appreciated, thanx! Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http:/

RE: [PHP] Re-engineering print()

2001-01-10 Thread Jason Murray
> #Option 1: code I wish worked > $s = include("phpcode.php"); > > #Option 2: also code I wish worked > $s = sprintf("%s", include('template.php')); $s = sprintf("%s", implode("\n", file('template.php'))); :) Jason

Re: [PHP] Check for spaces..

2001-01-11 Thread Jason Murray
David Smith wrote: > > With the following code how can I check to see if the file being uploaded > has a space in it? Maybe replace them with a _ or reject them all > together... > I think you want: $new_fname = ereg_replace("[[:space:]]+", "_", $fname);

Re: [PHP] php binary?

2001-01-11 Thread Jason Murray
d told me once. Since you are wanting something stand alone, do not forget that you can use other languages, too. Regards, Jason -- Jason Murray Developer jWeb New Media Design 1 877 525 jWEB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] space increment

2001-01-11 Thread Jason Murray
P 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] Use an array. Greetings, Jason -- Jason Murray Developer jWeb New Media Design

RE: [PHP] Easy Path ?

2001-01-11 Thread Jason Murray
e better off thinking of "/root/test/test.php"). You can explode this based on the "/" character to find the previous directory. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubs

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
figure out that I need to do a redirect or set a cookie? I assemble *all* the page content into a single string variable, and echo it out as the last thing the script does. This way I'm free to play with HTTP headers right up to that time. However, each to their own - your way works for you and

RE: [PHP] Dynamic 'left menu's' on site: Like a windows explorersystem???

2001-01-11 Thread Jason Murray
accessibility. > no web application is complete without a mix of client-side > and server-side application of code. If you don't want it to work in all browsers, you're right. If you know your audience isn't disabled and uses browsers that support JA *and* always have it sw

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
echo $output; include("$DocRoot/subpagestop.php3"); ?> There's advantages and disadvantages to both our ways, really. It's not worth an in-depth discussion because I think I've just sent everyone on the list to sleep as-is. But our way works for us just as well as

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
> it's valid to use single-quotes, double-quotes, or NO quotes. If you're going to use no quote, make damn sure you don't have any spaces :) Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http:

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
> emacs sucks! vi forever! :P Yes, I think its about time for another round of What Editor Is The Most Awesomest Best And R0xx0rz The World! :) Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
is is what we do here at INWW/Melbourne IT now, too. As such we've found the 100% PHP way works for us - but like I said, that's us. Every team's needs are different. This is what makes PHP so good, anyway - we can all use it the way that suits us. Jason -- Jason Murray [EMAIL P

RE: [PHP] please help - urgent! - email & attachments

2001-01-11 Thread Jason Murray
> I am after a php3 script that can do this... > > Have a form of about 20 fields where one of the fields can browse the users > hard drive so they are able to include an image, and then submit the form by > sending an email. All the other fields are just text. > > Kinda like a formail script bu

RE: [PHP] please help - urgent! - email & attachments

2001-01-11 Thread Jason Murray
This might help more, too: http://www.hotscripts.com/PHP/Scripts_and_Programs/Email_Systems/Email_Utili ties/ Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

RE: [PHP] Limit image height/width on upload

2001-01-11 Thread Jason Murray
> Is there a way to limit the image size with php? You would have to use some image manipulation functions to look at the file once it's been uploaded. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing Li

RE: [PHP] Size of Image

2001-01-11 Thread Jason Murray
> I have successfully uploaded the image. But now I want to > know the size width X height of the pixels of the image. Is > this possible to get the size and height of the image by php. Sure, http://www.php.net/manual/ref.image.php ... will show you where to find what you need. Jason -- PH

RE: [PHP] session cookie authentication

2001-01-14 Thread Jason Murray
POST and GET requests to the remote server, show headers (thus displaying the cookies), and parse the output so that you can find the cookie values in your script. cURL: http://curl.haxx.se/ Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP Gen

RE: [PHP] PHP Schedule

2001-01-14 Thread Jason Murray
Jason (since this was a PHP solution, I've taken the Debian ml off the response) -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

RE: [PHP] transforming an HTML Comment in a HTML TAG

2001-01-14 Thread Jason Murray
'll have to just do the ereg_replace on every second one. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

RE: [PHP] Re: [PHP-DEV] cookies and sessions security

2001-01-14 Thread Jason Murray
as you can, send the MD5 sum as the cookie value, and store it in the session table in the database. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: [PHP] transforming an HTML Comment in a HTML TAG

2001-01-14 Thread Jason Murray
I gave you to do that? Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- 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 administrat

RE: [PHP] transforming an HTML Comment in a HTML TAG

2001-01-14 Thread Jason Murray
save you a headache when you get to 2000. Or 2. > How would be a REGEX to recognize the tag and > ANY TEXT below? Love to help you, but I've already stretched the limit of my regex knowledge, sorry. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the

RE: [PHP] tie string value together

2001-01-14 Thread Jason Murray
o tie those three value like > below? > > $Birthdate = $year&$month&&day; > > And I will insert value in $Birthdate into table. Not quite. right idea, wrong syntax. You're just doing a simple string concatenation, so what you actually want is this: $Birthdate

RE: [PHP] date comparison

2001-01-14 Thread Jason Murray
er of days between your birthDAYS, then you'll want to substitute in a specific year in the mktime() statements above, as you'll otherwise end up with the number of days between your exact DATES of birth. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the com

RE: [PHP] I once saw a site where php codes, algorithms specially, where posted.

2001-01-14 Thread Jason Murray
> It has px...something...i cannot remember the exact site. > > could someone point me to that site? http://px.sklar.com Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscrib

RE: [PHP] date comparison II

2001-01-14 Thread Jason Murray
0115 and $date2 = 20010120 ( which of > course we can easily tell that $date1 come before $date2). > Can I use the sniplet below: Yep, you can use a simple > conversion in that case as long as its YMD :) Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy

RE: [PHP] Date data type problem

2001-01-15 Thread Jason Murray
;[^0-9]", "", $withdashes); This wil actually remove everything from the string that is not a number between 0 and 9 (ie, numbers). Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsu

RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
u can really do is make sure that its over a certain length. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

RE: [PHP] Re: [PHP-DEV] cookies and sessions security

2001-01-15 Thread Jason Murray
of using the remote IP! Thanks for the tip. I > am going to use it today for an authentication system I'm building. Careful. This will die in the butt if the client comes in from an ISP using load-balancing proxy servers. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melb

RE: [PHP] Re: [chiPHPug] Addslashes]

2001-01-15 Thread Jason Murray
> After all these years, couldn't two of these three end-of-line formats > swallow their pride and just deprecate themselves?... ... and break everything *else* that depends on them? Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! --

RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
s will fall flat on its face (in Australia, our phone numbers have 8 digits and our mobiles have 10 digits - this is the same in a number of countries). My advice, check that there's at least 7 digits and let it go. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT

RE: [PHP] Automated Scripts

2001-01-15 Thread Jason Murray
run PHP source code? Is this an example of such a script, emailling the same mail to the mailing list every monday at a specific time? I already replied to you off-list. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (htt

RE: [PHP] Re: [PHP-DEV] cookies and sessions security

2001-01-16 Thread Jason Murray
> Ach, oy vey! Then, having looked at AOL's info, it seems to me that > perhaps one could build a function or class that could evaluate > against a known list of alternate proxies. So, if the request came > from 152.163.197, it would recognize that as an AOL proxy and just > code the current p

RE: [PHP] < Levels of Access >

2001-01-17 Thread Jason Murray
uot;/admin/delete" by default. I'll see if I can grab some MySQL table definitions and the like if you'd like them... Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e

RE: [PHP] phpwebhosting.com

2001-01-17 Thread Jason Murray
> But even if they had 100 servers, have you priced an OC-12 lately? Actually, isn't it possible / more likely that they're running one server cohosted at an ISP with an OC-12 link? Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! --

RE: [PHP] HTML source in Apache error log

2001-01-17 Thread Jason Murray
> Lately I've noticed that my Apache error logs were filled up with HTML > sources. Logs grow rapidly and I have to clean it every once a while. Is > that caused by any particular PHP error? Well, find the page on your server with the HTML that matches what's in the error logs and you should be

RE: [PHP] Not quite relevant question about coding and query

2001-01-18 Thread Jason Murray
> $query = "insert into user values ('firstname','lastname','address','phone')"; > $resultinsert = mysql_query($query); > > $getID = "select userID from user"; // Will this get me the > // Id of the record I just inserted? > $resultID = mysql_query($getID); N

RE: [PHP] cookie paths are really confusing me...please help!

2001-01-21 Thread Jason Murray
s with a path of "/". Saves hassles, and the cookie is accessible everywhere. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: [PHP] file storage/downloader...

2001-01-21 Thread Jason Murray
> If I store the file in a non-apache directory, how does the > user download the file? Use a file, "download.php" that will make sure the user is authenticated, then fetch the contents of the file, and send the file to the browser. Jason -- PHP General Mailing List (http://www.php.net/) To

[PHP] Variable Strangeness

2001-02-21 Thread Jason Murray
Hi, I came across this: $confidential = 0; echo "$confidential " . ($confidential == "yes"); In which "0 1" was printed. Is there something I'm missing? Thanks, Jason -- Jason Murray Developer http://www.jwebmedia.com/ 1 877 525 jWEB

[PHP] File Upload Strangeness

2001-02-26 Thread Jason Murray
. Can someone give me a clue, please? Thanks, Jason -- Jason Murray Developer http://www.jwebmedia.com/ 1 877 525 jWEB -- 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

Re: [PHP] 2 columns same name cuz of a join

2001-02-26 Thread Jason Murray
r the help, and I hope my question is clear. :) > > Jason > Something like select tbl1.id as tbl1_id, tbl2.id as tbl2_id $ob->tbl1_id; should work... o fthe top of my head. Jason -- Jason Murray Developer http://www.jwebmedia.com/ 1 877 525 jWEB -- PHP General Mailing Li

RE: [PHP] calling functions

2001-02-26 Thread Jason Murray
PHP code is executed on the server side, not the browser. PHP code is executed on the server side, not the browser. :) Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EM

RE: [PHP] File downloading?

2001-02-27 Thread Jason Murray
"); file("whatyouwanttosend"); > ( I am not sure if my first email went through, I got an > error back about the mailbox being full) I didn't see it ... Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mail

RE: [PHP] File downloading?

2001-02-27 Thread Jason Murray
> Great, thanks. > I looked at the file(), but it sounded like is was just for > local file use. oops, should've been include(). Sorry :) Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To con

RE: [PHP] File Upload Strangeness

2001-02-27 Thread Jason Murray
> > > > Don't you need a MAX_FILE_SIZE for this to work properly? Jason -- 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] best slashdot?

2001-02-28 Thread Jason Murray
te currently > due to DB difficulties with the host (i.e., requested the DB and am still > waiting..) I'm evaluating PHPNuke at the moment. It certainly seems to have the goods on customisation. Besides which, you can always edit and fiddle :) Jason -- Jason Murray [EMAIL PROTECT

RE: [PHP] Dumb newbie graphics question

2001-03-01 Thread Jason Murray
g PHP generated graphics? That's possible. You might like to try manually downloading the file using a utility like wget or curl. This will show you if PHP is outputting any errors (which would thus result in a broken image). Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Me

RE: [PHP] what does $$ mean?

2001-03-04 Thread Jason Murray
> I'm studying some code from the net and was kinda curious. There are > places where it references variables like this: > > $$testvar > > What's the difference between that and > > $testvar > > ? $testvar means "the value of the variable named 'testvar'". $$testvar means "the

[PHP] strtotime question

2001-03-06 Thread Jason Murray
Hi there, $ob->date is '2000/03/06'. $d = ereg_replace('([0-9]*)-([0-9]*)-([0-9]*)', '\2/\3/\1', $ob->date); $d is now '03/06/2000'. $foo = getdate(strtotime($d)+86400); Here I have to add an entire day to the value of strtotime($d) to get the expected results for below. ec

Re: [PHP] Please Help!!!! - Really BASIC stuff!

2001-03-06 Thread Jason Murray
Use include(). Like http://www.jwebmedia.com/ 1 877 525 jWEB -- 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] obtain IP from other site ( or domain name)

2001-03-06 Thread Jason Murray
> I have exchange link business program with other sites, > basically I give a hyper link to come to our store to them > and when user click on the link on their site to come to us, > they will genrate income from it too. > The question is that how do I know that when a user click on > the li

Re: [PHP] explode question

2001-03-07 Thread Jason Murray
e if a match is found? > > Any hints would be great. > > Many thanks > > Roland This will do it: $dim = sizeof($arrLoginName); for ($nr = 0; $nr < $dim; $nr++) { if (match) { return 1; } } Greetings, Jason -- Jason Murray Developer http:/

RE: [PHP] new php.net look

2001-03-07 Thread Jason Murray
> The older look was neat to show off to people re: pop up menus, etc., > but this is a real speed demon, and will be much more useful for > searching around. I agree. Very smart, smooth and clean! Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the co

RE: [PHP] tutorials on good database design

2001-03-13 Thread Jason Murray
me real-life examples that you'd care to discuss in the > open? Using real-life examples (with the added realism of budgets, > legacy code, deadlines, etc.) may help everyone here. I agree - throw us some examples of what you're thinking about, Justin. Jason -- Jason Murray [E

RE: [PHP] Multi-Step Script

2001-03-13 Thread Jason Murray
> if( $submit ){ > print "I love Montana"; > >>>put form #2 in here w/ action = $PHP_SELF make sure you > set $submit2 to > some value > ) > elseif( $submit2 ){ > print "Part two of script"; > } > else{ > >>>put your form in here w/ action= $PHP_SELF > } Actually - do it in the reverse order, be

RE: [PHP] Anyone running their own Servers & DNS versus renting space/services from an ISP or Hosting??

2001-03-14 Thread Jason Murray
reliability, uptime and client happiness. I wouldn't *dream* of moving a client's site from the hosting company to my own system - I don't want to be blamed for the downtime, and any server problems. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch t

RE: [PHP] Print MySQL DB as Exel File?

2001-03-14 Thread Jason Murray
c). I'd go for tab delimiting over comma delimiting, since your text fields will probably contain commas but will *very* *exceedingly* rarely have tabs. I've ripped some code out of phpMyAdmin to do this (ta Tobias, if you're watching ;)) - I can post it if you want to. J

RE: [PHP] Email validation

2001-03-20 Thread Jason Murray
> Can anyone tell me what the best form of Email validation > there is? It needs to be quick & as open to - and . as possible. We use this one on www.inww.com: Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing

RE: [PHP] header redirection

2001-03-20 Thread Jason Murray
> Why wouldn't this redirect? Because you need to do this: Jason -- 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] Populating HTML List boxes From DB

2001-04-16 Thread Jason Murray
> say in my db i have multiple values that are the same as well > as different values... how can i restrict it to showing each > value just once? Sounds like you want a "SELECT DISTINCT". You might want to have a look at www.sqlcourse.com. Jason -- PHP General Mailing List (http://www.php.n

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Jason Murray
> >$query ="SELECT DISTINCT device FROM 3backup ORDER BY device"; > $rs =mysql_query($query); $rs is now the result set for your SQL. > $device = mysql_result($rs, 'device'); This is wrong. Check the manual page for how you use mysql_result. http://www.php.net/mysql-result > while($

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Jason Murray
Brief correction. > while($row = mysql_fetch_row($rs)) ^^^ should be "array". Jason -- 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,

RE: [PHP] How do i include ASP script into PHP...??!

2001-04-16 Thread Jason Murray
> $f=fopen('http://your.server/legacyscript.asp"), "r"); > if($f) > { > /*read the data from the file handle and deal with it as you > wish - you > might want to process it somehow, or just output it as part > of the current > page*/ > fclose($fp); > } This won't include the ASP script. It w

RE: [PHP] Wrong parameter count

2001-04-16 Thread Jason Murray
> $device = mysql_result($rs); // line 19 mysql_result expects the result set, the row number and the field name. You should not need this, anyway. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

RE: [PHP] is it safe to stripslashes() on all form variables?

2001-04-17 Thread Jason Murray
> Disabling magic quote will reduce amount of code and increase > performance a little, unless application is very small. Without > magic_quote, script does not have to get rid of slashes to use > value from browser and add slashes again before feeding to > database. Code would be cleaner and easie

RE: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Jason Murray
> > > while($row = mysql_fetch_row($rs)) > > > > ^^^ should be "array". > > Why should it be array and not, let's say, object? Because I went on to use it as if I'd used fetch_array in the rest of the example code, I'd wager. :) Jason -- PHP General Mailing L

RE: [PHP] Is this kind of code safe?

2001-04-17 Thread Jason Murray
> $test="b"; > if ($test=="a"): > ?> >value is a > else: > ?> >value is not a > endif; > ?> > > It seems to work, ie it outputs different text depending on > the value of $test. But is it safe, can I rely on this > behaviour? Yes can rely on it, but I just think it's somewhat ugly.

RE: [PHP] How do i include ASP script into PHP...??!

2001-04-17 Thread Jason Murray
> Easy. Just use fopen('http://localhost/file.asp') then fread > the data you want. I do this technique to read Access tables > from a Linux box. But that gives you the RESULTS of the ASP script, not the script itself. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] Add data to three tables at once from one form

2001-04-18 Thread Jason Murray
> Add two more sets of statements like those you have for the > first query. That's it. There's nothing special to do. MySQL also lets you stack insert statements: $sql="INSERT INTO t1 ('A'); INSERT INTO t2 ('B'); INSERT INTO t3 ('C');" This would work (but if you get an error, you'll have tr

RE: [PHP] Global variables

2001-04-18 Thread Jason Murray
> I know there is a way to do it in Perl, but is there anyway > in PHP to display all of the global variables. Such as OS, > browser, date/time, that sort of thing > > I know I could print each one seperately, but are they all > stored in an array somewhere? That should show you everything

RE: [PHP] Newbie Help!! Please Look!

2001-04-18 Thread Jason Murray
> I need to know if there is a program out there that I can use to edit > the PHP files. I use CuteFTP to download the files from my server as I > need to change some wording around from time to time. Does anyone know > the correct procedure for downloading a php file with CuteFTP and then a > p

RE: [PHP] Newbie Help!! Please Look!

2001-04-18 Thread Jason Murray
HP files, open it in WordPad. Me, I use HomeSite. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To co

RE: [PHP] Different Question??

2001-04-18 Thread Jason Murray
> $recipient = $email; > $headers = "From: Sirplus.tv <[EMAIL PROTECTED]>\n"; > $headers .= "X-Sender: <[EMAIL PROTECTED]>\n"; > > This grabs the email address out of MySql and send them the email that > would be following. However, I want a copy to go to me as well. What > line of code to

RE: [PHP] HTMLSpecialchars

2001-04-18 Thread Jason Murray
> I'm having a problem with HTMLspecialchars and nl2br interfearing with > each other. Obviously, I'm trying to stop malicous HTML/scripts from > being entered into my guestbook, but I'm also trying to add spacing. > nl2br adds , but HTMLspecialchars tells it to not show that. > > Anyways, I'm s

RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray
> Is there any PHP native function to redirect to another page or URL? No, because you can only redirect a browser to another page using the appropriate HTTP command (it is a header) or JavaScript. > I would like that once the user clicks on home.php4 and a few > verifications are done, he/she

RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray
> I never had any trouble using header() to redirect, but > wouldn't something like this work even better (without > worring about previous outputs)?? > > function redirect($dest) > { > ?> > > parent.location.href=''; > > } > >

RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray
> Yeah... I know that... but, c'mon... a browser that doesn't support > Javascript can't surf trough at least 30% of all websites... it's the > absolute minority. Netscape itself is a minority. That's not the point. You should be writing the code such that you shouldn't need to make this kind

RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray
the fuss we'd have if we required JavaScript for something. :) Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "What'll Scorpy use wormhole technology for?" 'Faster pizza delivery.' -- PHP General Mailing List (http://www.php.net/) To uns

RE: [PHP] calculate length between date to date

2001-04-22 Thread Jason Murray
> I have 2 variables here that store date start and date end, I > want to compare the lenght between the start date and the end > date, how would I do that? > $dateStart = "$year" . "$mon" . "$date" ; ( for instance, it > will return "20010102") > $dateEnd = "$yearEnd" . "$monEnd" . "$dateEnd"

RE: [PHP] trouble reading a database (fwd)

2001-04-23 Thread Jason Murray
> Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName = > "SailBoat.jpg"and FLD_Path =" /var/www/html/slidecollection/WinterCarnival" This is a little hideous. For one thing, you should probably use ' and not ". It may not make a difference to MySQL, but it does to other databases you may us

RE: [PHP] Using

2001-04-23 Thread Jason Murray
> One question though. Why does your have a name > attribute at all? Probably so it can be addressed through JavaScript. Jason -- 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 a

RE: [PHP] Now, why doesn't this work?

2001-04-23 Thread Jason Murray
> Any ideas? Yes - get it to output the actual SQL that's running. That way you can execute it yourself, and see what's going wrong. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

RE: [PHP] function in if statement not executed ?-->> Help

2001-04-23 Thread Jason Murray
> if($l=="d") { > log_user(); > } else if($r=="d") { > add_user(); > } else { > $r ="y"; > } looks like: 1. $l is not set to "d". 2. $r is not set to "d". $r may be set to "y" by this code. Did you check it? Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EM

RE: [PHP] Sensitive Information (like CC)

2001-04-23 Thread Jason Murray
> What's the best (secure?) way of transmitting sensitive > information over email? I'm helping some friends build an online > order form. They have a Thawte certificate and are already using > it for the order form, but they would like the information to be > emailed to them when an order i

RE: [PHP] Convert a numeric string

2001-04-24 Thread Jason Murray
> I'm looking in the docs but printf doesn't seem to be able to do that. You want http://www.php.net/manual/en/function.number-format.php. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To con

RE: [PHP] Sensitive Information (like CC)

2001-04-24 Thread Jason Murray
> Leave the messages on the server and get them via pop3s. > Outlook is capable of pop3 via ssl. I wouldn't do that - it makes the server a great hack target. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

RE: [PHP] Lines

2001-04-25 Thread Jason Murray
e, if possible? I didn't see the purpose (I'm tired) - I just answered the q cos I had a heart attack when I saw an answer of "use a database" for counting line numbers ;) Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "What'll Scorpy use

RE: [PHP] Lines

2001-04-25 Thread Jason Murray
> > it's my first post on this list, and my doubt is... > > > > how can i take a file.txt and > > > > 1 - know how many lines i have in this text > > 2 - print line 5 until 10 > Is there any chance for you to use a database? > these thing would become MUCH, MUCH easier. Actually, this is reall

RE: [PHP] mysql table speed

2001-04-27 Thread Jason Murray
It's 1:30am here and I'm still at work :) Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "What'll Scorpy use wormhole technology for?" 'Faster pizza delivery.' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMA

RE: [PHP] Storing php-code in mysqlDB

2001-04-27 Thread Jason Murray
> I try to store phpcode in a mysql-database, to have them ready, when > they´ll be needed > When I request these, it seems that they will not be parsed. > Any suggestion? Eval() it. http://www.php.net/manual/en/function.eval.php Jason -- Jason Murray [EMAIL PROTECTED] W

RE: [PHP] REG_BADPAT ERROR!

2001-05-02 Thread Jason Murray
> and the line 236 is: $url=ereg_replace("&","&",$url); BADPAT probably means "Bad Pattern". Try:$url=ereg_replace("\&\;","&",$url); Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

RE: [PHP] Passing variables to another page - newbie

2001-05-06 Thread Jason Murray
> Thanks to everyone for the help - unfortunately my problem > seems to be the function I'm using to do the redirecting. header() is > supposed to be the first item passed. What I'm trying to do is use a line of > code well down into the logic of my script to redirect the user to another > p

RE: [PHP] Pattern matching and replacement!

2001-05-08 Thread Jason Murray
> As you can see. I am using the {% and %} to delimit the parts > that need to be replaced. I can't get the replacements to work > right though. Can someone help? $text = ereg_replace("\{\%Last_Name\%\}", $lastname, $text); Should be something like that :) Jason -- PHP General Mailing Lis

RE: [PHP] Putting quotes in?

2001-05-08 Thread Jason Murray
> Okay I am taking a number from a mySQL database and I want to > put quotes on that number? $databasenumber = "\"123.123.123.123\""; or $databasenumber = '"123.123.123.123"'; Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

  1   2   3   4   >