View Single Post
Old 08-22-2013, 01:11 AM  
paffie
Confirmed User
 
Industry Role:
Join Date: Mar 2013
Posts: 116
Quote:
Originally Posted by nexcom28 View Post
If I went down the .php could I just not call the php from anywhere within the page or does it need to be in the header.
I'm happy the plugin works for you :-)
In case anybody ever finds this post, and wants to use php instead of a plugin, the anser to your question is: the header location has to be set before any other data is sent to the users browser (if i remember correctly)...
In other words, you can actually make a database-query, use classes and functions,... and depending on the outcome of your querys and calculations print the "header('location" or not. As long as nothing is sent to the browser during the execution of your code.... So it wouldn't be wise to use this line in the <body>-section ;-)
__________________
Need a VPS? I use Ramnode, great uptime, friendly support and only $62/year (after their lifelong coupon) for an openVZ VPS => [email protected], 512Mb ram, 512 Mb swap, 120 Gb SSD, 1Gbps port, 2 Tb bandwith, 1 IPv4, 16 IPv6, weekly backups

Last edited by paffie; 08-22-2013 at 01:13 AM..
paffie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote