[PHP] PHP generated JavaScript

2006-02-19 Thread Tim Burgan
Is is possible to make an external Javascript with PHP. Am I doing this correcT? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: php4 vs. php5

2006-02-02 Thread Tim Burgan
Hi Brad Kowalczyk wrote: > Almost > all php4 code will run as expected on php5 (but not the the other way > around) and the benefits of php5 are many. I'm wondering if you can outline, or direct me to a resource that explicitly notes the benefits of php5 over php4. Thanks Tim

Re: [PHP] Upgrading PHP 4.2.3 to PHP 4.3.2

2005-08-16 Thread Tim Burgan
Can I extend this.. On a live server I have PHP 4.1. If I upgrade to PHP 5, is something likely to stop working? I've been putting off upgrading for months because of the unknown of something going wrong. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

[PHP] Writing a PHP Web application

2005-06-30 Thread Tim Burgan
Hello, What are the options to get code to run on the server (every XX minutes), without any user interaction, etc. Example 1: If I have a directory that contains files, can I write a script that will delete all files older that 5 days? Example 2: If I write an email web application, and the use

[PHP] Why does PHP have __toString() and not just toString()

2005-04-12 Thread Tim Burgan
Hello, I'm a University student studying Java, but I also do some freelance web design - so naturally I do a fair bit of PHP which seems to be very similar to Java. Usually I just code PHP as I need it, but down the track get REALLY annoyed when I need to edit or update my code. It's hard to fo

Re: [PHP] HOWTO read PHP source code into a textarea

2005-02-26 Thread Tim Burgan
Thank you everyone, I was trying to use file(), with some problems.. thank you for your suggestions to use file_get_contents(). Perfect! You're all right, it works really well. Thanks Tim ... Tim Burgan. Website & E-Commerce Developer Web: ... -- PHP General Mailing List (http://ww

[PHP] HOWTO read PHP source code into a textarea

2005-02-25 Thread Tim Burgan
Hello, I have a file 'nav.php', whose source code I want to load into the textarea on page 'aaa.php', so the source can be edited and changed. Is there a resource that I can read to help me do this? Thanks Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP] html_entities_decode, but ignoring embedding php tags

2005-02-23 Thread Tim Burgan
Hello, I have a string: $str = '

This is a paragraph

'; Which I convert using: html_entity_decode(stripslashes($str)); Which result in: This is a paragraph But.. I was the PHP tags to STAY ENCODED like: This is a paragraph How do I do this..? Than


[PHP] How do I add PHP code into a DB field

2005-02-17 Thread Tim Burgan
Hello, On my page, all my content is updated via a textarea online. If I include PHP code embeded with my HTML in the textarea, the database converts it to plain text, instead of code that can be used. It doesn't convert < to < though, it's still in the database as <, just when it's read out aga

Re: [PHP] function to remove all \" from a variable

2005-02-15 Thread Tim Burgan
Sorry for clogging up you mail box. Yes.. str_replace('\"', '"', $_POST['FCKeditor1']) works. I must've needed to think through my thoughts by typing it out. Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] function to remove all \" from a variable

2005-02-15 Thread Tim Burgan
Hello, I'm using FCKeditor to edit content on my site. But the content it produces escapes all the " (double quote) characters from my HTML, and replaces it with \" (backslash-double quote). Is the a function that I can use to change it back? Does str_replace() do it.. if so is this how I use it

Re: [PHP] Re: Delete all files in DIR every 20 days

2005-02-14 Thread Tim Burgan
Jason Barnett wrote: Please give the list longer than an hour to respond to your request ;) Thanks for the suggestion.. I've just given the list 6 hours at the moment. Why do you say this? Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Tim Burgan
Hello, How can I delete ALL files within a specified directory every 20 days? Does anyone know of any code-snippets that are around at the moment that are able to do this? (And where I can find them?) Thanks Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Tim Burgan
Hello, How can I delete ALL files within a specified directory every 20 days? Does anyone know of any code-snippets that are around at the moment that are able to do this? (And where I can find them?) Thanks Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] How do I collect the keywords a user entered when searching for my site

2005-02-09 Thread Tim Burgan
Hello, My original post: "I want to write some code that will retrieve the keywords entered in a search engine that were used to find my site." I found this article [1] was a solution that I successfully implemented. [1] Tim

[PHP] How do I collect the keywords a user entered when searching for my site

2005-02-07 Thread Tim Burgan
Hello, How do I collect the keywords a user entered when searching for my site? I want to write some code that will retrieve the keywords entered in a search engine that were used to find my site. Is it possible to also detect what my site's search engine ranking was for the entered keywords als

[PHP] Headers already sent error

2005-02-02 Thread Tim Burgan
Hello, I'm receiving an error "Cannot modify header information - headers already sent by XXX". In my php, I have a heap of code, then use header("Location: blah.php"); to redirect the user. I get this error on the webhost, but not on my local host. I've searched and found that this can be cau

[PHP] Sending email when sendmail_from & sendmail_path = null.

2005-01-30 Thread Tim Burgan
Hello, My client's web host's PHP configuration for both sendmail_from and sendmail_path are both = null. How do I send email with PHP? What options do I need to set within my code, and what to? Tim

[PHP] Image manipulation without GD library

2005-01-25 Thread Tim Burgan
Hello, Is there any way that I can do some image manipulation - resizing - without the GD libraries? Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session errors when uploaded to host

2005-01-23 Thread Tim Burgan
Thankyou. That solved the issue. I didn't know that function existed. Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Session errors when uploaded to host

2005-01-22 Thread Tim Burgan
Hello, I've developed my site, and tested on a web host (Apache, PHP 4.3.9). Now I've uploaded to a different host (IIS, PHP 4.3.1) where I want to keep it, and I get session error messages like: Warning: session_start() [function.session-start ]: open

[PHP] [suspicious - maybe spam] Using heredocs

2005-01-21 Thread Tim Burgan
Hello, I've just tried using heredocs [1] for the first time, but I am receiving parse errors always on the very last line of my document. The error is caused by my heredocs. Am I using it correctly? When I replaced the heredoc with a string.. everything worked again. Here's my code with heredocs (

[PHP] Allow users to upload images to directory

2005-01-20 Thread Tim Burgan
Hello, How can I allow users of my website to upload JPEG's to a set directory, and then have the JPEG scaled-down if they upload some huge image (both in pixel size and resolution)? Is there anything around that clearly (and simply) explains this? Thanks Tim -- PHP General Mailing List (http://

[PHP] SQL - INSERT INTO booleans

2005-01-19 Thread Tim Burgan
Hello, I'm trying to insert a new row using the following SQL: $db_sql = "INSERT INTO tblStudents (name, username, password, expiry, permissions, website, displayUser) VALUES ('Joe', 'joejoe','pw4joe','20-Jan-05','staff','true','false');"; In using MS Access via COM, the data types for each colu

[PHP] my for loop's gone bananas.. has yours?

2005-01-18 Thread Tim Burgan
Hello, I have a for loop to create a HTML combo box that displays the 10 year values, starting from today's year and incrementing until 10 years it reached. The output of the loop to the browser is weird. If anyone has time, can you please let me know where I screwed up? Here's my loop: echo '

[PHP] php style guides

2005-01-12 Thread Tim Burgan
Hi everyone, What 'rules' do you follow about styling/formatting your PHP code? Do you follow a guide that is available online? I generally have my own preference for formatting like if ( condition ) { statements; } for all conditional statements and loops, as opposed to if (condition) { st

Re: [PHP] strange sessions

2005-01-11 Thread Tim Burgan
in, staff are Joe (username & password are both: joe) and Simon (username & password are both: simon). Students are Tim (username & password both: tim), and Grace (username & password both: grace). Thank you very much for your time and assistance. I cannot thank you enough. Tim Bur

[PHP] strange sessions

2005-01-10 Thread Tim Burgan
Hello, I'm experiencing a weird thing regarding sessions - that I'm using for user authorisation. I have a page that the "public" can view (index.php) that includes a login button. When the login button is clicked a new window pops-up and asks for username and password. The user is then logged-

[PHP] how to read the path of the current document's url

2005-01-08 Thread Tim Burgan
Hello, I have a page where the URL is along the lines of http://www.example.com/test.php I've tried using the parse_url() function without success.. I'm trying to just get "test.php" returned as a string. Can someone please point me in the right direction with this. Thank you for your time. Tim

[PHP] Using the OR operator in an IF statement

2005-01-08 Thread Tim Burgan
work: if ( ($_POST['usertype'] != "student") || ($_POST['usertype'] != "staff") || ($_POST['usertype'] != "admin") ) { // ... } ?> And also: I must be using the OR operator the wrong way. Can someone please correct me on th

Re: [PHP] Fatal error: Call to a member function on a non-object

2004-12-22 Thread Tim Burgan
Hi Michael, Michael Sims wrote: [...] These might be relevant: http://bugs.php.net/bug.php?id=31159 http://marc.theaimsgroup.com/?l=php-dev&m=110375720614120&w=2 Thanks for your reply. This does sound like it is the problem. Does anyone know if there is a workaround for this? Ti

[PHP] Fatal error: Call to a member function on a non-object

2004-12-22 Thread Tim Burgan
Hello, I have a database driven (MS Access 2000) PHP website that runs fine on my localhost (Apache, WinXP, PHP 4.3.9), but when I upload it to the web host (IIS, PHP 4.3.10) and try to access a page I receive the following error: Fatal error: Call to a member function on a non-object in c:\XX

[PHP] How do I write to an XML file

2004-01-12 Thread Tim Burgan
via a form that is written to the xml file, then have a support person add an answer to the xml file. Any help would be greatly appreciated. Thanks Tim Burgan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP forms that are valid XHTML

2003-12-30 Thread Tim Burgan
Thanks for your replies. The name attribute is depreciated in XHTML for use with the input tag and has been replaced with the id attribute. The name element can still be used in the form tag though. What I'm looking for is something similar to ASP's GetElementByID("example")

[PHP] PHP forms that are valid XHTML

2003-12-30 Thread Tim Burgan
isplay on the next page after the submit button is pressed, but if I change it 'id' the results do not display. How can I fix this? Thanks Tim Burgan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Planning a new job

2003-06-03 Thread Tim Burgan
posal? Any help would be wonderful, thanks. Tim Burgan [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] secure code

2003-05-27 Thread Tim Burgan
;block' hackers. Thanks Tim Burgan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] MySQL Login Setup not working with PHP

2003-02-12 Thread Tim Burgan
ocal machine.. that even I can understand. Thanks Tim Burgan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php