How do I change the Default Design? [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have two different web designs(Created in PHP, HTML, CSS and JavaScript) Can I upload both and just switch them from time to time?
How do I redirect so i can choose what design will show when i open my website?

Try with this code :
if(some condition here)
header('Location:design1.php');
else if(some condition here)
header('Location:design2.php');
or you can also use include function.
if(some condition here)
include("design1.php");
else if(some condition here)
include("design2.php");
Thanks.

Related

Replace PHP with text [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have some PHP that displays the users session name in the HTML and if the user is not logged in, then I would like it to display "User" instead.
Can I have an if statement in this case? I tried it myself but I got header errors.
This is what I've tried so far but each practical attempt just spits out more errors at me.
This is a different approach I have tried.
<?=$_SESSION['sess_user'] or ("User");?>!
<?php echo (isset($_SESSION['sess_user']) ? $_SESSION['sess_user'] : "User"); ?>
This will check if the session is set, if it is then echo the session, if it isn't then it will echo "User".

PHP - If condition not working [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
The if condition below is not working
if(!strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') && $task != "view"){
//do something
}
What I am trying to say here is that if not iPhone and if $task not equal to view, then do something.
Currently $task is equal to view but I am not on an iPhone, so I should see the (do something code) I have.
What's wrong with my condition?
Currently $task is equal to view but I am not on an iPhone, so I should see the (do something code) I have.
This means you want want prevent "iPhone" or "view" but what you implement is preventing "iPhone" and "view". Try this:
if(!strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') or $task != "view"){
//do something
}

How can i store and fetch.php page in mysql [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have a project in which i have to make a code in which when we click on menu bar and the option that we select in menu bar the page related to that option will display all this is to be done through my sql.Is there any way to do this task.
I don't understand exactly what you want and if there is a better way to do this, but don't put in your sql fields PHP code.
You can create a xml document instead, and use it better.PHP.net - XMLdocument

How to implement an event driven model in PHP? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
How could one build a system using PHP that tracks every event that occurs? Such as when someone comments on something, likes something or changes something.
The only thing that comes to mind right now is by the use of query strings when ever one invokes a command.
Try implementing the Observer pattern.

can you anyone please explain what is the use of viewport in the header.php file in wordpress [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I have seen this code in my header. php file, i don't know what is the use of this tag. They also mentioned initial scale=1.0 like that so can you anyone explain me what the use of that code.
It's used to set the initial scale of the layout. If the initial scale is set to 1, then the layout will be viewed at a scale of 1:1 (no zooming). It can be adjusted as well as changed to a set width.

Categories