[PHP] diffence between two numbers...

2005-04-15 Thread Tristan . Pretty
I need to know the difference between two numbers... eg: $a = 7; $b = 27; somefunction($a, $b) // outputs 20 $a = 10; $b = 12; somefunction($a, $b) // outputs 2 etc... does that exist?

Re: [PHP] file upload

2005-03-24 Thread Tristan . Pretty
http://www.hotscripts.com/Detailed/24113.html take a look at this.. perhaps you can reverse engineer it William Stokes [EMAIL PROTECTED] 24/03/2005 09:18 To php-general@lists.php.net cc Subject [PHP] file upload Hello, I'm (slowly) learning how to make a file upload stuff with php.

[PHP] Got to be an easier way to get a list of files/folders?

2004-12-22 Thread Tristan . Pretty
I'm writing a photo gallery for my site. I want to make it as idiot proof as possible... What I'm planning, is to is upload my pics to a folder in the photo directory, and then run a scan to see what new folders there are. All good, I've built a DB backend to lsit teh folders etc... but I need to

Re: [PHP] Got to be an easier way to get a list of files/folders?

2004-12-22 Thread Tristan . Pretty
Ignore me.. I'm dumb after all... I found what I needed in my very first PHP book...! Jeeez, is it Friday yet??? [EMAIL PROTECTED] 22/12/2004 16:20 To php-general@lists.php.net cc Subject [PHP] Got to be an easier way to get a list of files/folders? I'm writing a photo gallery for

[PHP] URL variables, and the $_GET[xxx] function...

2004-10-21 Thread Tristan . Pretty
I'm moving hosts for a freelance site I do... They have an events section, and it's sortable by date, name and category etc... To achieve this, I passed the search/sort variables via the URL... However, I'm testing the new server, and those variables are not being detected? I've put this code

[PHP] converting from name - id and PHP not seeing it?

2004-09-23 Thread Tristan . Pretty
I jsut finished converting my pages to be W3C compliant... One of the recuring 'errors' I had was my form elements were all using the 'name' atrtribute... apparently, this is bad, and I was suggested to switch them ti use the 'id' attribute... all good, I did that, but for some reason, when I

[PHP] mail() and the From: attribute...

2004-08-13 Thread Tristan . Pretty
I'm sending out a mail, en mass to about 25 people, using the while loop from a MySQL query... Anyhoo, In the mail() function, if I use the final field for the From: attribute. I'm having probs... HAving: ...From: [EMAIL PROTECTED]); doesn't work on all recipients... BUT.. ... From:

Re: [PHP] mail() and the From: attribute...

2004-08-13 Thread Tristan . Pretty
I've tried just having a name, and it still doesn't reach my notes based E-mail... :-( Hmmm, also, how do you specify to send in the BCC field, using the mail() function? All in all, we're getting there..! -John Nichel [EMAIL PROTECTED] wrote: - To: [EMAIL PROTECTED] From: John

[PHP] Combining two variables...

2004-08-04 Thread Tristan . Pretty
I'm trying to create a links page, and I wanna filter by category. Anyhoo, What I need to do, is have one block of code that I repeat ad neaseum, based on each category, so if I adda new category, I don't need to add new code... All good so far. So I have a variable $show_links but I wanna

[PHP] PHP upgrade... issues???

2004-07-15 Thread Tristan . Pretty
I've just got this mail from my host... = Dear customer, This email is sent to inform you that we'll upgrade the PHP version on your server to the latest stable version 4.3.8 within the next hour. = Are there any issues that I need to panic about...? I'm off to google

Re: [PHP] PHP upgrade... issues???

2004-07-15 Thread Tristan . Pretty
Phew! However, While reading about php upgrades, I've got the impression that version 5, will not support MySQL by default... Does that mean that I'll have to ensure my hosts install an extra module, or worse case senario, I'll have to re-write all my pages, to take new code into effect... I'

[PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
Hi there... My misses has just started a new job, but has got loadsa websites blocked, including hotmail. So I've decided to see if there's a php alternative, that I can code/steal etc... If I can host a series of php pages, that can get a list of emails, and access to read them... replying

Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
You're very welcome... Indeed... who doesn't enjoy a brief break to see what's happening in their world? I ended up using 'hail' (http://www.hailware.com/) As far as I can tell, it doesn't allow attatchments... Spending lunch hour checking personal mails... who can honestly admit that it never

Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
I get the distinct impression that this idea is not a favourable one? Just trying to earn brownie points with the misses... not trying to annoy 'the man'. Ho hum... Back to surfing for porn at work ;-) raditha dissanayake [EMAIL PROTECTED] wrote on 13/07/2004 14:56:38: [EMAIL PROTECTED]

Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
really? me.. I've not turned that on in over a year? That's a worry... when was this...? I'll tell our tech support group, perhaps there was a problem.. cheers for the heads up! raditha dissanayake [EMAIL PROTECTED] 13/07/2004 16:46 Please respond to [EMAIL PROTECTED] To [EMAIL

Re: [PHP] email formatting

2004-06-02 Thread Tristan . Pretty
When you create $selections Make sure you add a '\n' to the end of each line... EG: $selection .= $myrow[result1]\n; BigMark [EMAIL PROTECTED] 03/06/2004 08:28 To [EMAIL PROTECTED] cc Subject [PHP] email formatting Is it possible to have this code changed easily to make the output

Re: [PHP] making selection in drop down

2004-05-28 Thread Tristan . Pretty
I use a javascript to help me with bigger dropdowns... script function get_links() { document.all[field_name].value='?echo$field_name; ?' /script Torsten Roehr [EMAIL PROTECTED] 28/05/2004 16:12 To [EMAIL PROTECTED] cc Subject Re: [PHP] making selection in drop down Alex

[PHP] IF statement question...

2004-05-19 Thread Tristan . Pretty
Is it possible to request that a string CONTAINS another string...? EG: $string = 1, 2, 3, 7, 8, 9; if ($string CONTAINS 7) { // Do stuff } * The information contained in this e-mail message is intended only for the

Re: [PHP] IF statement question...

2004-05-19 Thread Tristan . Pretty
If I'm being Dumb, I apologies... but When using this: $row[bands] = 1,2,3,4,5,6,7,8; $row2[id] = 7; if (strpos($row[bands], $row2[id]) != FALSE) { // do stuff } I get the No 13 (as it's inthe 13th place in the string) as my result. Now I'm aware that it should work, as it's not

[PHP] A work around my HTTP_REFERER Prob...

2004-05-07 Thread Tristan . Pretty
To recap... We have two servers: 1. USA - holds most of our databases, and E-mail. but specifically, the usernames and passwords, or all our users (Lotus Domino Server) 2. UK - Runs our website. (Unix Server) We wanted to be able to allow people to login on on server 1, and getr authenticated

Re: [PHP] A work around my HTTP_REFERER Prob...

2004-05-07 Thread Tristan . Pretty
I looked into getting PHP to talk to a Lotus notes database, and was really really scared..! I think this is my best bet, for now at least... however, my simple code does not work? Wierd... Any other ideas? Richard Harb [EMAIL PROTECTED] 07/05/2004 11:38 Please respond to Richard Harb

Re: [PHP] A work around my HTTP_REFERER Prob...

2004-05-07 Thread Tristan . Pretty
Cheers for all ideas/suggetions so far.. I've made a little progres... Visit this URL: http://www.risk.sungard.com/secure.php?secure=126807.714285714 and here's the code.. ? $today_day = date(d); $code1 = ($today_day+1) * $_GET[secure]; $code2 = $today_day * $_GET[secure];

Re: [PHP] Re: HTTP_REFERER ... ?

2004-05-06 Thread Tristan . Pretty
... ? [EMAIL PROTECTED] (Tristan Pretty) wrote in news:OF19FCC4A7.F49C9B83-ON80256E8B.00544E7D- [EMAIL PROTECTED]: if ($_SERVER['HTTP_REFERER'] == 'http://www.mysite.com/') { // Stuff } Now why does this not work? I wanna asign varibales based on certain referers... but this is not working? Any

[PHP] HTTP_REFERER ... ?

2004-05-05 Thread Tristan . Pretty
if ($_SERVER['HTTP_REFERER'] == 'http://www.mysite.com/') { // Stuff } Now why does this not work? I wanna asign varibales based on certain referers... but this is not working? Any ideas why? * The information contained in this

Re: [PHP] HTTP_REFERER ... ?

2004-05-05 Thread Tristan . Pretty
Sadly, I get nothing... the other server I'm talking to is owned by our company, it's a Lotus Domino server... so in theory, they'll be able to enable this variable to be passed? John Nichel [EMAIL PROTECTED] 05/05/2004 17:07 To [EMAIL PROTECTED] cc Subject Re: [PHP] HTTP_REFERER ... ?

[PHP] Maths not working.. or is it me?

2004-04-15 Thread Tristan . Pretty
Im trying to implement some really simply credit card encryption... I know it's not perfect, but it's a stop gap measure until I do this properly... however... To Encrypt before I put into my DB, I'm using this formula... $encrypt = $CardNumber / ($ExpiryYear * 41.9); (41.9 is just a random No

[PHP] View folders...

2004-04-15 Thread Tristan . Pretty
I'm trying to create a page where I can show all folders in a directory. I've looked on google and php.net, but have yet to find an answer... Any clues? * The information contained in this e-mail message is intended only for

[PHP] combining variables...

2004-04-06 Thread Tristan . Pretty
Simply put, can I connect 2 variables, to make one... I want to output: $view_request_$i making for example a string: view_all_2 But I'm getting errors..? Parse error: parse error in /home/risk/public_html/download/results3.php on line 675 is there a simple explination...?

Re: [PHP] combining variables...

2004-04-06 Thread Tristan . Pretty
Sadly, it didnb't work... here's my code... I wanna repeat and output final variables 6 times... == for ($i = 1; $i = 6; $i++) { if ($view_request_bu_$i != '') { $view_request_$i = strtolower($view_request_bu_$i); } else if

[PHP] faking $HTTP_REFERER

2004-03-29 Thread Tristan . Pretty
My boss wants to combine the previously build security, that we have within a notes Domino server, with a few pages that we run on PHP. As I've tried to use PHP to talk to a notes database, and failed I've decided that the easiest option is to: 1. Add a link on the notes site to the PHP site.

[PHP] the '' character and PHP...?

2004-03-18 Thread Tristan . Pretty
I've a script that uses '' However, if I pass that as a variable to another page, everything after it, gets ignored... I've tried: 1. Esacping the character with '\' 2. Using amp; But nothing works... Any ideas how to include an '' in my variable? Tris...

Re: [PHP] mail() to own domain not working

2004-03-17 Thread Tristan . Pretty
Ooo, I had this recently when we moved to beamhost.co.uk I'll mail them and ask them what they did to fix it... I'll be back... Gerard L Petersen [EMAIL PROTECTED] 17/03/2004 14:59 To Php-General [EMAIL PROTECTED] cc Subject [PHP] mail() to own domain not working Hi all Im having a

Re: [PHP] mail() to own domain not working

2004-03-17 Thread Tristan . Pretty
Well, they replied: Do you mean the email is not working at the moment or you\'re asking for the solution we did last time? We modified your code and changed @ to \\@ within the mail header. Any use? [EMAIL PROTECTED] 17/03/2004 15:21 To Gerard L Petersen [EMAIL PROTECTED] cc Php-General

Re: [PHP] mail() to own domain not working

2004-03-17 Thread Tristan . Pretty
Sorry, had an extra \ == Do you mean the email is not working at the moment or you're asking for the solution we did last time? We modified your code and changed @ to \@ within the mail header. Tristan Pretty/Infinity 17/03/2004 15:37 To [EMAIL PROTECTED] cc Gerard L

Re: [PHP] Advanced PHP Mailing List?

2004-03-05 Thread Tristan . Pretty
I use 12All from Active campaign... Great site, GREAT support... and the code was not beyond me in most places... Galen [EMAIL PROTECTED] 05/03/2004 08:58 To [EMAIL PROTECTED] cc Subject [PHP] Advanced PHP Mailing List? Hi, Don't mind if I ask this, but are there any other large PHP

[PHP] Forms, or multiple headers?

2004-03-05 Thread Tristan . Pretty
I'm talking to a MySQL database that contains info on all downloads from our site. I list all these entries, on a PHP page. The table structure etc, are static, but the fields retrieved, are dynamic, based on the users search criteria. Within each result, I've added a small form, that posts that

[PHP] Delayed mail()... ?

2004-02-20 Thread Tristan . Pretty
I've been asked to add a small amount of functionality to a site I've built (It's a techer at home web site) Basically, prospective teachers/students, can sign up for more info etc. Currently, that info is captured, and the site admin people are E-mailed... all good so far.. What they've

Re: [PHP] Re: Delayed mail()... ?

2004-02-20 Thread Tristan . Pretty
Right, I'm off to php.net, to learn all about cron jobs... i've never heard ofit ;-) (I'll come out from under my rock now) Cheers everyone Ben Ramsey [EMAIL PROTECTED] 20/02/2004 13:36 To [EMAIL PROTECTED], Tristan Pretty [EMAIL PROTECTED] cc Subject [PHP] Re: Delayed mail

[PHP] htmlspecialchars... or...?

2004-02-18 Thread Tristan . Pretty
Hi all... I've having problems submitting information to salesforce.com... I have a system set up that allows my users here in the office, to send individual leads, to salesforce... However, if the users details contain characters such as... Ù ë ý Ñ Ã etc... htmlspecialchars only does

[PHP] Unsubscribe (mailign lsits in general) question...

2004-01-20 Thread Tristan . Pretty
I've been told by my boss, that the law has changed in relation to 'Opt out' options on mailing lists etc... she tells me that I have to now change all my forms to conform. She claims that now, each time the user must click the 'remain subscribed' link, or we have to remove them from our

[PHP] Destroy all session data...

2004-01-13 Thread Tristan . Pretty
I've just asked my host to set my session time limit to 30 days... From 0 I'm now running into problems, and I think that destroying all session data sill help... Until I get this sorted, can I kill everyones stored session data?

Re: [PHP] Destroy all session data...

2004-01-13 Thread Tristan . Pretty
I do't know to be honest, how do I find out? (I'm on a unix server) Matt Matijevich [EMAIL PROTECTED] 13/01/2004 16:11 To [EMAIL PROTECTED] cc Subject Re: [PHP] Destroy all session data... [snip] Until I get this sorted, can I kill everyones stored session data? [/snip] How is the

Re: [PHP] writing Excel files through PHP

2004-01-12 Thread Tristan . Pretty
You know, I've been struggling with this probelm fr ages, and wouldn't you know it, I really over complicated things.. using this simple header method, I've done it... Cheers for the heads up... It pays to read eh? ;-) Tris.. Marek Kilimajer [EMAIL PROTECTED] 10/01/2004 13:22 To Binay

[PHP] file upload - But outside of web directory...?

2004-01-12 Thread Tristan . Pretty
Hi there... I keep all my downloads outside of the web folder on my site. I only allow users to download them by them using the download page, and changing teh header info when a file is requested.. What I want to do now, is allow the other site users to upload files to that same directory...

Re: [PHP] Comparison PHP to Perl

2004-01-06 Thread Tristan . Pretty
In fact, I hope you do more than session_start() and go in PHP, else you are probably vulnerable to a number of session-based attacks. Man, that's all I do alot of the time? What dangers are there, care to share any facts figures about that...? I'll go away now and read up again on sessions...!

[PHP] Counting back 90 days...

2004-01-05 Thread Tristan . Pretty
Got this function... I wanna remove 90 days from todays date, giving a final date, in the same format as the original, that counts back 90 days... I'm listing dates on a reporting tool, and I've been asked to only show info that we recieved in the last 90 days... Anyhoo... I believe I can minus

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Tristan . Pretty
My word... 6 odd lines, to one... you're a genius... Cheers for that... Tris... Richard Davey [EMAIL PROTECTED] 05/01/2004 11:45 Please respond to Richard Davey [EMAIL PROTECTED] To [EMAIL PROTECTED] cc [EMAIL PROTECTED] [EMAIL PROTECTED] Subject Re: [PHP] Counting back 90 days...

Re: [PHP] best way to specify path to a file in a $variable?

2003-12-30 Thread Tristan . Pretty
I personally link my css files using the root dir... eg: host/myaccount/mywebsite/mycssfile.css That way, it's always pointing to the correct file... hope it helps/// Danny Anderson [EMAIL PROTECTED] 30/12/2003 14:15 To [EMAIL PROTECTED] cc Subject [PHP] best way to specify path to a file

[PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
I want to out put three bits of text... I want my end page to look like this... = result 1 result 2 result 3 = here's the code I've got... === ? $i = 1; while ($i = 3) { $options$i = result $i; } ? html body ?=$option1 ? ?=$option2 ? ?=$option3 ?

Re: [PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
Cheers... Doesn't work for me though...? What do the '{' mean when declaring the variable? Chris Boget [EMAIL PROTECTED] 22/12/2003 14:16 To [EMAIL PROTECTED], [EMAIL PROTECTED] cc Subject Re: [PHP] combining two variables to make one??? ? $i = 1; while ($i = 3) { $options$i =

Re: [PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
I am a monkey... I had me angle bracket the wrong way round... what a stoner...! Chris Boget [EMAIL PROTECTED] 22/12/2003 15:04 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP] combining two variables to make one??? Doesn't work for me though...? Which isn't working?

[PHP] includes...

2003-12-18 Thread Tristan . Pretty
bit of a random thought I need answering really... when referencing external files, what's the difference between: ../ / ./ I know that ../ means back one directory and jsut a / means look from the root directory, but what is: ./ ??? Cheers all..

Re: [PHP] includes...

2003-12-18 Thread Tristan . Pretty
Oh... So it's the same as not having any /'s just the file name? Marco Tabini [EMAIL PROTECTED] 18/12/2003 14:01 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP] includes... That means the current directory Cheers, Marco -- php|architect - The Magazine for PHP

[PHP] Inserting function into mail()???

2003-12-17 Thread Tristan . Pretty
Ok, here's my code that I want to pick a random line from a text file, and then mail myself 10 times with a different line each time... But It simply won't work... Anyone know why? ? function randomline($filename) { $file = file($filename); srand((double)microtime()*100);

[PHP] Leechers...

2003-12-09 Thread Tristan . Pretty
I've just installed and am happily using Galery HP (http://www.galleryhp.org/) A great photo gallery package... Anyhoo, I want to now be able to stop people from linking to the images directly, and only be able to access the images via my site... Is this possible...? Perhaps my questio is to

RE: [PHP] Leechers...

2003-12-09 Thread Tristan . Pretty
Cheers for this... On the 'new mail' thread... I did start a new mail this time, I remember cause I'm been flamed for this before..? Curious... Sadly, I use Lotus Notes, if I opened an E-mail, copied the address and then hit new mail, would Notes remember and extra info? Quite quite confusing

RE: [PHP] Leechers...

2003-12-09 Thread Tristan . Pretty
Forget my whole new post retort ;-) Wouter van Vliet [EMAIL PROTECTED] 09/12/2003 14:11 To 'Wouter van Vliet' [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] cc Subject RE: [PHP] Leechers... On dinsdag 9 december 2003 14:30 Wouter van Vliet told the butterflies: On

[PHP] CHMOD...

2003-12-04 Thread Tristan . Pretty
Is there anyway to use CHMOD: chmod (/somedir/somefile, 0755); but have it set all files, folders etc to the CHMOD setting I want? I have a folder, and within that, I wanna quickly, jsut set it all to CHMOD 777. all sub DIR's and files etc... can it be done simply? E.G. : chmod (/somedir/%,

[PHP] trim...

2003-11-26 Thread Tristan . Pretty
Why doesn't this work...? $body = pblurb blah phappy days pend of text; $body = trim($body); $body now should output: pblurb blah\nphappy days\npend of text but it doesn't...? I'm using a text string in a javascript, adn it needs to be outbut on one line to work, yet this isn't doing it...

[PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
Below is some code, I've written, where I'm trying to do the following... 1. Display a text box, for a user to enter a number of email addresses, seperated by a comma. 2. take that value, split it based on the comma and place that vlaue into an array. 3. Count the No of elements in the array 4.

Re: [PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
Not a problem... I do try and be thorough when I create mails... I'll be more list friendly in the future... cheers for the heads up! Nw, if I can only solve my prob, I can go home ;-) Jason Wong [EMAIL PROTECTED] 19/11/2003 16:42 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED]

Re: [PHP] R: [PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
Cheers to everyone, it works great! Easy when I look at it now, but ant it the way... I'm off to the pub now.. later... Tris... Alessandro Vitale [EMAIL PROTECTED] 19/11/2003 16:50 To [EMAIL PROTECTED], [EMAIL PROTECTED] cc Subject [PHP] R: [PHP] mailing multilple addresses...? try

Re: [PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
It should be off...! I went away for two weeks recently, and left my subscription runing ot he list... sorry... I'll be more careful... It's been a funny few weeks... ;-) Tris... Marek Kilimajer [EMAIL PROTECTED] 19/11/2003 17:17 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re:

[PHP] Passing header info for use in downloading files...?

2003-11-11 Thread Tristan . Pretty
I have a page where the user clicks a link to download a file, but the file is out side of the root DIR. passing certain variables in the link, (type, file_name) I call the correct file... However, it's stopped working? My code below shows how I select the correct mime info to pass to the

[PHP] Tristan Pretty is out of the office.

2003-11-05 Thread Tristan . Pretty
I will be out of the office starting 23/10/2003 and will not return until 11/11/2003. I will respond to your message when I return. Please contact Fiona or Alan for any issues. * The information contained in this e-mail

[PHP] Tristan Pretty is out of the office.

2003-10-29 Thread Tristan . Pretty
I will be out of the office starting 23/10/2003 and will not return until 11/11/2003. I will respond to your message when I return. Please contact Fiona or Alan for any issues. * The information contained in this e-mail

[PHP] Tristan Pretty is out of the office.

2003-10-29 Thread Tristan . Pretty
I will be out of the office starting 23/10/2003 and will not return until 11/11/2003. I will respond to your message when I return. Please contact Fiona or Alan for any issues. * The information contained in this e-mail

[PHP] Allowing specific IP's to bypass security.

2003-10-21 Thread Tristan . Pretty
Hi all... I have a form that captures data, before then showing a few download links... However, If the user is in our office, I want to bypass the form... so at the very top of my page, I've put this... (details_captured is my variable I use on the form as a hidden field, to confirm that the

[PHP] Sessions.. (I'm learning), can't call a variable?

2003-10-16 Thread Tristan . Pretty
Not sure if this is a MySQL Q. or a PHP one, but here goes... I'm just learning sessions... And I'm trying to add a session variable to a MySQL database. I've done this page that takes the results from a previous form... But I get this error: Parse error: parse error, expecting `T_STRING' or

Re: [PHP] Re: header() function...

2003-10-15 Thread Tristan . Pretty
You are all heart... ;-) Curt Zirzow [EMAIL PROTECTED] 14/10/2003 17:23 To [EMAIL PROTECTED] cc Subject Re: [PHP] Re: header() function... I officially declare this thread foobar. Curt -- My PHP key is worn out PHP List stats since 1997:

[PHP] header() function...

2003-10-14 Thread Tristan . Pretty
We've just moved sites, to a new URL... on the home page of the old url, I simply had a page that was; ? header(Location: http://www.newsite.com); ? All good, any requests to that page, were cleanly redirected to the new site. I know this cause I tested it many times... Now on the stats for

[PHP] $PHP_SELF and include all variables?

2003-10-14 Thread Tristan . Pretty
I'm using $PHP_SELF, but need to automatically record what variables are in the URL at that time... is that possible? I've searched PHP.net, but cannot find this specific function... Cheers, Tris... * The information contained

Re: [PHP] Re: header() function...

2003-10-14 Thread Tristan . Pretty
Bog standard web server logs... We're hosted on a windows server I think... (sadly) Scott Fletcher [EMAIL PROTECTED] 14/10/2003 16:25 To [EMAIL PROTECTED] cc Subject [PHP] Re: header() function... Web Server's log file or user defined log file (Sort of Like PHP Log)? Tristan Pretty

[PHP] Cookies Vs Sessions...?

2003-10-03 Thread Tristan . Pretty
Age old question...? Please don't flame if it is I currently remember my visitors on my site by setting a cookie thusly: setcookie(logged, yes); On each protected page, put an IF ($logged == yes) { //show page etc } else {//show login form etc } All good, works fine hooray for me...

[PHP] file_exists on different server...

2003-09-30 Thread Tristan . Pretty
I'm referencing an image on a different server, and it keeps changing URL's Very odd, but t get round that, I tried... if (file_exists(http://www.othersite.com/image_1.gif;)) { $image_show=http://www.othersite.com/image_1.gif;; } else {

Re: [PHP] file_exists on different server...

2003-09-30 Thread Tristan . Pretty
RTFM? (Sorry, very newbie question) Jason Wong [EMAIL PROTECTED] 30/09/2003 12:26 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: [PHP] file_exists on different server... On Tuesday 30 September 2003 19:00, [EMAIL PROTECTED] wrote: I'm referencing an image on

Re: [PHP] Header and dfile download bug???

2003-09-15 Thread Tristan . Pretty
Well, I'm on IE V6.0.2800 My boss, has the same version. Yet.. when she hits the link, she get's the error, (unable to open file) However, I didn't say before, that it's Acrobat reader, that's giving the error. The file is downloaded etc... yet on my machine, I can see the file, and on hers, she

[PHP] Header and dfile download bug???

2003-09-12 Thread Tristan . Pretty
Hi all, I have a download for that collects data from a user (name, e-mail etc) then I pass that info to a database and give them the file. In the form, I pass two hidden variables, header and details_captured. So when I post the form to $PHP_SELF, it detects this and then activates the header

Re: [PHP] Linking to files outside the directory structure...?

2003-08-28 Thread Tristan . Pretty
Getting there. I'm using... $path = /home/risk/public_html/$bu/$file; //Where $bu is the folder name where the file is, I've passed that from the previous form, no worries there. I've also passed the file name from the previous form, as I have the file type. header(Content-Disposition:

[PHP] Linking to files outside the directory structure...?

2003-08-27 Thread Tristan . Pretty
I wanna protect a few files from reandom downloads. I'm moving hosts soon, and will loose my mod_auth_mysql module that let it talk to the .htaccess file. What I want to do is store a number of files, outside of my web folder, say one level under it, but still get my browser to retrive that

[PHP] Host Check...?

2003-08-20 Thread Tristan . Pretty
http://www.beamhost.co.uk/hosting.html I'm moving hosts with our site at work... I found these guys and am very impressed. Has anyone had any dealings with them? Know if they are any good? Tris... * The information contained in

[PHP] removing parts of a string...

2003-07-24 Thread Tristan . Pretty
I wanna be able to take a URL http://www.mysite.com/downloads/file_1_a.pdf and then remove: http;//www.mysite.com/ then add: /host/sites/site1/web/ to downloads/file_1_a.pdf Turning: http://www.mysite.com/downloads/file_1_a.pdf Into: /host/sites/site1/web/downloads/file_1_a.pdf I know I need

Re: [PHP] removing parts of a string...

2003-07-24 Thread Tristan . Pretty
Cheers for your help... I did this in the end... $rest = substr($row[file_info], 27, 100); $download = /home/sites/site1/web$rest; where $row[file_info] = the full URL and the 27th character is the .com/ bit. Live and learn, I love this language! Cheers one

[PHP] Hiding URL's...

2003-07-24 Thread Tristan . Pretty
I read this article, and thought it was perfect for me... Just the same prob I'm having... http://forums.devshed.com/archive/5/2002/06/2/37330 However, I don't understand how to get the file into an A tag where it can still find the file, AND make the URL useless if copied and pasted.. Am I

Re: [PHP] removing parts of a string...

2003-07-24 Thread Tristan . Pretty
Never thought of that... Luckily, this function is gonna be held on a server for downloads only, and all the requests are gonna come straight from the 'master' site else where. So I really shouldn't run into probs right now... I will however lookinto making it that little bit more idiot proof

[PHP] $PHP_AUTH_USER question...

2003-06-06 Thread Tristan . Pretty
I have a page that allows a user to login, provided their username and password files from a previous form, match an entry in a MySQL database. All fairly standard. How can I get that to talk to $PHP_AUTH_USER? When I use an .htaccess file to a directory that's protected, I don't want the user

Re: AW: [PHP] Kill a cookie....

2001-05-17 Thread Tristan . Pretty
Thanks to all who replied. I am really confused as to why, at teh very top of my page, I have told the cookie to set to null. and then in the last part of my php, just before my head tag, I re-set teh cookie. but the old value still remains. What am I doing wrong??? Thanks you guys, I'll get

[PHP] Kill a cookie....

2001-05-16 Thread Tristan . Pretty
I am using setCookie(cookie1, $form_variable) Is there a command like killCookie? I am finding that my pages are remembering cookies after they are needed. I've looked on php.net, but couldn't find anything. Tris... **

Re: SV: [PHP] Help plz!

2001-05-03 Thread Tristan . Pretty
Whoa, take a deep breath and lets try again shall we. Elias, I have run into this prob before, but each time, it seemed to dissapear without reason. If you fancy joining a more.. liberal disscussion group, I recomend joining WDVL. It is a list for all things webby, and most computer related

Re: [PHP] Help plz!

2001-05-03 Thread Tristan . Pretty
Here you go mate... type in: view-source:http://www.anyurl.com and you'll see the source code. I did this in IE, but I presume it'll work in NN Good luck mate. Tris... === hmm take it easy! i ask whetever... and you reply if you can't and don't reply at all! PS.

[PHP] Random number generation...

2001-05-02 Thread Tristan . Pretty
Hi there, A potentially dumb question here. Is there an easy way to display a random number between 1 and 20? I have looked on line, but either I am looking inall teh wrong places, or there isn't this script on-line. Can anyone point me in the right direction? Cheers, Tris...

[PHP] reading a URL...

2001-03-26 Thread Tristan . Pretty
'ello, Is it Possible, in PHP to read a URL? What I am trying to do is this... I have many news stories in a database, and a single static news page, that calls the story, and the corresponding headline. I have looked about on-line, and seen a common URL,...

[PHP] External file?

2001-03-15 Thread Tristan . Pretty
Morning, I have a section of HTML that Is added to a page if a user logs in successfully. Itis about 30 lines long, and I have included it in each page. What I would like to do, is to have the HTML on a seperate file, and have the PHP call it if and when a user logs in. Is this possible?

[PHP] Naming cookies

2001-03-13 Thread Tristan . Pretty
Afternoon guys and girls I have a queston regarding cookies... I have a login form that takes the member name and password from a MySQL Database. I have three fields: member pw userlevel I want to set a cokkie to remember the user and thier user level, so I named the cookie -

[PHP] Using selected fields

2001-03-12 Thread Tristan . Pretty
Hi there, Firstly a big thanks to those who pointed me in the direction of 'PHP-fast and easy web development'. it was/is a great book, and I have learnt loads on the past week. Anyhoo... I have a php page and included the line: $sql = "SELECT * FROM $table_name WHERE member =

[PHP] PHP Book

2001-03-12 Thread Tristan . Pretty
Hi there, I got this book from php.net is it the one you're after? who knows. I just tried mailing it to you, but it was a huge 9Mb and my Firewall stops mails after 5Mb What I have done for you is put it up on line at my site. Click here to get it, but remember it is 9Mb in size, have you got

Re: [PHP] PHP Book

2001-03-12 Thread Tristan . Pretty
My god, you ever have one of those days??? I missed out an R... the correct address is... http://www.beertastic.co.uk/phpman.pdf I am sorry, lets try again eh? Tris... Could not resolve nameserver. Original Message On 3/12/01, 8:44:32 AM, [EMAIL PROTECTED] wrote regarding [PHP] PHP

[PHP] Tutorial?

2001-03-02 Thread Tristan . Pretty
Hi there, Iam new to the world of PHP, and after my boss told me to learn PHP and MySQL, I found my way here. I am gettign to frips with MySQL, and Basic PHP seems to be sticking in my brain, but I'd really appreciate it if you guys could point me in the direction of a good on-line tutorial

[PHP] Tutorial?

2001-03-02 Thread Tristan . Pretty
Hi there, Iam new to the world of PHP, and after my boss told me to learn PHP and MySQL, I found my way here. I am gettign to frips with MySQL, and Basic PHP seems to be sticking in my brain, but I'd really appreciate it if you guys could point me in the direction of a good on-line tutorial