How to move PHP code above - Post ID...
I'm trying to redirect to a new page with a header() statement in my code, but I get an error that output already started in line 1--the DOCTYPE that is inserted. I've tried putting the code in the "Head Code" and "Before Code" for the body, but that doesn't get it to the top.
UPDATE: I finessed it with an echo calling javascript, but I'd still be interested in knowing how to do it the more straightforward way.
You will need to do that after exporting the project file. That's the only way ( and the quickest way)I have found to do that, unless others have a better solution
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?
LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact me
https://rsd-tutorialscom.coffeecup.com/index.html
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?
LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact me
https://rsd-tutorialscom.coffeecup.com/index.html
Just a couple of thoughts, as I cannot think of any way within SD to enter a line above the DOCTYPE line.
1. Would the problem have arisen if the page from which redirection is to occur had the extension set in the Page Manager to PHP?
2. The second answer in the link below may be helpful regarding the redirection. I wonder whether that would work satisfactorily in the Head Code box without being the top line.
The first of the 20 comments in that link may also be useful.
https://stackoverflow.com/questions/541 … er-on-load
Frank
1. Would the problem have arisen if the page from which redirection is to occur had the extension set in the Page Manager to PHP?
2. The second answer in the link below may be helpful regarding the redirection. I wonder whether that would work satisfactorily in the Head Code box without being the top line.
The first of the 20 comments in that link may also be useful.
https://stackoverflow.com/questions/541 … er-on-load
Frank
It seems best, like Wayan says, to add the script that is to go in before the doctype after export. It can be done by adding a line like this:
<?php include_once(‘filename’); ?>
And then the 'filename' will be something.php or whatever else there is to be inserted above the doctype declaration. If 'something.php' is kept out of the SD, it can be edited without having to open the SD project, save, export, and edit after export, etc.
The above is a hint I got from another Brian
<?php include_once(‘filename’); ?>
And then the 'filename' will be something.php or whatever else there is to be inserted above the doctype declaration. If 'something.php' is kept out of the SD, it can be edited without having to open the SD project, save, export, and edit after export, etc.
The above is a hint I got from another Brian
Ha en riktig god dag!
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Maybe a good option in the future would be to add an optionion "Add Custom Code" like we can add custom html.
Learn something, Share something.
Bosco wrote:
Maybe a good option in the future would be to add an optionion "Add Custom Code" like we can add custom html.
Maybe a good option in the future would be to add an optionion "Add Custom Code" like we can add custom html.
We can I do it all the time especially CSS AND JS(With help from Frank and Eric and Inger when I don't know the code).
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?
LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact me
https://rsd-tutorialscom.coffeecup.com/index.html
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?
LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact me
https://rsd-tutorialscom.coffeecup.com/index.html
The problem for PHP users is that in SD, we cannot add any custom code ABOVE the doctype declaration. It has to be done after export.
Hopefully, this will be made possible soon.
Hopefully, this will be made possible soon.
Ha en riktig god dag!
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Inger wrote:
The problem for PHP users is that in SD, we cannot add any custom code ABOVE the doctype declaration. It has to be done after export.
Hopefully, this will be made possible soon.
The problem for PHP users is that in SD, we cannot add any custom code ABOVE the doctype declaration. It has to be done after export.
Hopefully, this will be made possible soon.
Ahh yes I didn't notice it was about adding custom PHP sorry, but then a little bit stressed at the moment the volcano we live on the side of blew it's top again yesterday we are just outside the danger zone but the wind has changed and it's big raining, we will have to see if we have to evacuate, I might decide to anyway for the sake of our new little one, didn't notice the title for the thread, sorry.
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?
LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact me
https://rsd-tutorialscom.coffeecup.com/index.html
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?
LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact me
https://rsd-tutorialscom.coffeecup.com/index.html
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.