Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > PHP question

PHP question
Thread Tools
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Aug 17, 2004, 07:39 PM
 
What is the PHP command to load a URL? I am trying to open a page after processing a new entry into a mysql database. I have successfully inserted the record, but now I want to take the user back to the main page (from the page where they just inserted the new record) without any further interaction.

thanks,
kman
     
qyn
Dedicated MacNNer
Join Date: Dec 2000
Location: sj ca
Status: Offline
Reply With Quote
Aug 17, 2004, 08:04 PM
 
If you want to just show them the content, you can use the readfile() command:

Code:
int readfile ( string filename [, bool use_include_path [, resource context]])
Or, if you want to do a redirect:

Code:
<?php header("Location: http://www.example.com/"); /* Redirect browser */ /* Make sure that code below does not get executed when we redirect. */ exit; ?>
You can read about these things at http://us2.php.net/manual/en/index.php
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Aug 19, 2004, 10:05 AM
 
Anyone have a suggestion for a good text editor for coding php? pico just isn't cutting it. I have kde installed if that increases my options any.

thanks,
kman
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Aug 19, 2004, 12:05 PM
 
Originally posted by kman42:
Anyone have a suggestion for a good text editor for coding php? pico just isn't cutting it. I have kde installed if that increases my options any.
Try:
Vim-X11 (basically vi but with correct highlighting for code) http://www.vim.org/

Bluefish http://bluefish.openoffice.nl/

xemacs (similar to Vim-X11) http://www.xemacs.org/
-DU-...etc...
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Aug 19, 2004, 12:41 PM
 
Originally posted by kman42:
Anyone have a suggestion for a good text editor for coding php? pico just isn't cutting it. I have kde installed if that increases my options any.

thanks,
kman
http://www.codingmonkeys.de/subethaedit/

or

http://www.tumultco.com/HyperEdit/

or

http://www.barebones.com/products/bbedit/index.shtml
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
qyn
Dedicated MacNNer
Join Date: Dec 2000
Location: sj ca
Status: Offline
Reply With Quote
Aug 19, 2004, 01:16 PM
 
My fav: Taco!

http://www.tacosw.com
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:36 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2