Show Page Depending On Request Url?
Is there any way to show a different page depending on the request url? I have a few domains that point to one IP address. What I want to do is if someone requests
http://www.site1.co.uk they see site1.php or
http://www.site2.co.uk they see site2.php etc
all from the root directory? I do not have httpd.conf access Is this possible?
View Complete Forum Thread with Replies
Related Forum Messages:
Create Links To Show Some Mysql Request
I'm trying to do something for about 3 days and I really see no way out on this... can be something simple, but I really suck at php... I have this php agenda that uses mysql DB... Then I have a search option that looks for event name, description of the event and date. Code:
View Replies !
Getting Page Referer Without Depending On User
I NEED the page referer for a script i've built to work, basicly i'm redirecting to my frames page with a line like this.. if ($m == "find") { $mainframe = $_SERVER['HTTP_REFERER']; } but i've been told that this data is sent from the user, so i need some way of telling my script which page to use as the main frame.
View Replies !
Dynamic Image Depending On Page
I have a At the top of each page I am including navigation.php, which includes the logo in the top left corner. For one page, I'd like to use a different logo but I still want to just include the navigation.php page. Is there any way I can say "if you're on this page, use this logo image"?
View Replies !
Best Way To Change Values Of Fields Depending On Page Function.
I have at the moment a create_user.php and edit_user.php they are the same, create has <input type="text" value="" name="xx"> for a field, and edit has <input type="text" value="<?=$row['rowhere']?>" name="xx"> - I would much rather have just the one page where if page function was edit then it calls in the row otherwise leaves value blank. How can I do this other than if ($pagefunction == "create") { echo "<input type="text" value="" name="xx">"; } elseif ($pagefunction == "edit") { <input type="text" value="<?=$row['rowhere']?>" name="xx"> } on every field!?
View Replies !
Highlight Certain Items On A Page Depending On Incoming Link
A PHP solution to the challenge was eventually developed by participants that suited the original poster's needs brilliantly. My needs are somewhat similar. I have a page of links (something like a big site map) several times larger than the advert page at the center of the thread above (it cannot be split into smaller pages). Code:
View Replies !
Need To Request The Page ID
Can anyone spot the problem with this. Code: <?php if($id_REQUEST['id']==3){ echo"output our header"; echo "<div style="background-color:#cdcdcd;width:100%">New header</div>";} else{}?> Basically I want to request the ID number of a page (in a forum) and spit out a header that is specific to that ID. So if for example viewforum?id=1 is called then I output a header that is specific to the topic that the forum is about.
View Replies !
If Value =1 Direct To Page Otherwise Show Data On Page
In the member account area there is a button saying (list) when the member clicks this they are redirected to add.php here i am wanting to check if a members account is limited, if it is direct them to a page saying you must pay your bill. if its not display the info on the page. in the database there is a field called limited which is tiny in if its not limited the value of the field would be 0 if it is limited the value would be 1.
View Replies !
If Page = 'about' Show The About.html Page?
I wanted to do some kind of PHP script so that if the current page the viewer is trying to view is called index.php?page=about then it will use the php script to embed with an i-frame the about.html file into a cell in my web page's table. Basically, so that the whole page stays the same other than one cell of the table which is dynamic depending on the status of the index.php?page=whatever. Code:
View Replies !
SoapClient: __doRequest Doesn't Get XML SOAP Request In Its $request Parameter?
to work around an interoperability problem with the PHP5 SOAP extension, I'd like to modify the generate XML SOAP request. (as described in ) To acheive this, I subclass SoapClient and overwrite the __doRequest() method. According to the PHP documentation and the article above, the $request Parameter of __doRequest() should contain the entire XML SOAP Request. However, in my test it only contains the parameter of the SOAP call. Here is my code: --- class MySoapClient extends SoapClient { public function __doRequest($request, $location, $action, $version) { var_dump($request); // modify XML SOAP request here later return parent::__doRequest($request, $location, $action, $version); } } $wsdl = "http://localhost:8080/geodirectoryws/geodirectoryws?WSDL" $soapclient = new MySoapClient($wsdl); $soapclient->getIPInfo(array("192.168.1.1"); --- I expect to see the entire XML as output of the var_dump() call, but I only get 'string(285) "194.120.109.9"' This happens with both PHP 5.0.4 and 5.2.0. Am I doing something wrong, or is this a bug in PHP or the PHP documentation?
View Replies !
Show Some And More On Next Page
I'm stuck making my log for login sessions show only 50 per page. The reason I need this is because it will only display about 250 items before not updating/displaying anymore. If anyone has a link to a tutorial, that would be super- couldnt find one via google.
View Replies !
Show When The Page Has Been Last Modified
1. I have php script that will show when the page has been last modified. How do I link it on my home page. The link that I am using now does not work. Here is the link: <? include("updatepage.php"); ?> 2. I have a php forum. When I link it this way <a href="xxxxx/index.php"> it brings up the source code. When I link it this way <a href="xxxxxx/"> it brings up the dir. When I link it this way <a href="http://xxx/xxxxx/index.php"> it works. How do I get it to work with this linking <a href="xxxxxx/index.php">
View Replies !
Show 20 Results Per Page
i have created a database with some data in it and i want my page to read page and display the first 20 results and on the bottom to add numbers like [1] [2] [3] so the user can go to the next results.I figured that i can display the first 20 results by adding a counter on the while loop $num_rows = mysql_num_rows($result); $k=0;      while (($k<=20)&&($row = mysql_fetch_row($result))){ $k+=1; $i+=1;but i don't know how to display the numbers on the bottom.Here is my try <?php for($j=1;$j<=($num_rows/20);$j+=1){   echo "[".$j."]"; } ?> ...
View Replies !
Flash .swf Doesn't Show In PHP Page
I've recently put together a flash navigation for a 4 page site... three pages are HTML, the index page is PHP with a weblog. In all current Mac browsers, all four pages load fine. In Win IE 6 only the .shtml pages will load the flash--the .php page shows a big white box instead. If I include the index.php in the index.shtml file, the flash loads fine, but I'd like to know if there is some issue with PHP & flash that I should look out for... or is the issue with IE 6.
View Replies !
Show Image On Same Page
I echo a certain amount of images, these images are thumbnails. I want to be able to show the real enlarged image next to the thumbnail without having to reload the page. So what i'm thinking of is something like the onclick function in JS. I tried some stuff but still can't make it work. my code is something like this: for (i=0; i<count($test); i++){ echo "<a href="...."><img src="$test[$i]"></a>"; } tried putting a javascript function in there but wasn't successful. i basically need to pass just $i to another function and that function onclick() will produce the image.
View Replies !
Show Home Page On Log In
I want to have a homepage with a log in feature. But I want it to say 'You are not logged in" or "you are logged in" depending on whatever is the case. I know how to check db entries etc but should I have the php on the same page in order to position the welcome note ie: <?php echo "<p>Welcome $_SESSION(username), to my website</p>;?>
View Replies !
Show Number Of Visits On Each Page...
How should i do when I want to show number of visitor on each page where each page is describing a user details like this: http://localhost/user.php?user=1 on this page it show details about user 1. And for user_52 I want to show how many visitors this user have had: http://localhost/user.php?user=52 it will show number of visits
View Replies !
Show Error Message On Same Page
I have Index.php which contains the HTML form with a username and password field + submit button, action: is my check.php. Say for example the user only input's a username and miss out the password field; when he clicks the submit button. I want the same page to be refreshed with a error message appearing below the submit button saying "error, please fill all in". I can get this to display on another page. but want this to be on refereshed on the log-in page.
View Replies !
Show Page Break In Records
I've just started to learn php and sql, and I noticed that there are several php discussion groups here. Pardon me if this is the wrong group, and I hope my first question isn't too silly. :-) I'm building a website that will publish articles, so I have an article table which contains a heading field, an ingress field, and a body field which will hold the complete article. There are line shifts (or page breaks) in this field, but my display-page won't show them. How do I show the article with the page breaks?
View Replies !
How To Sho Video Clip On Web Page Also A Live Show On Web
Indeed I am using php and Mysql. My licent want to 1. Show a video clippings on the web site. What I need to do ? Please elaborate a n example will be great thing. 2. He also want me to show live telecast of a seminar What arrangement I ned to do From hardware point of view as well as Software point of view.
View Replies !
Page Load Time Show Really High
im running PHP 5.2 on IIS 6 (Windows 2003 Server) and im getting a weird load time result when trying to display page load times on each page. e.g. Page generated in 1193387528.5501 seconds. this is my current code: <?php $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo '<p>Page generated in '.$total_time.' seconds.</p>'." "; ?> but i've tried 4 others which are all simular. Any idea as to why it's showing a false result as it's loading in unde 1 second (Dual Xeon 2.8 HT server and connecting over 100mb pipe (college campus)).
View Replies !
Get A Paragraph Of Text To Show On The Home Page Only
I am using a script that I purchased and downloaded. This script has a template folder and inside has header. php, and footer.php. The center content is populated from various other pages. How would I get a paragraph of text to show on the home page only, and no other pages in the script
View Replies !
How Do I Alter This Script To Show 5 Rows Per Page?
I'm very new to php/mysql and am having a few problems I would like to show five rows of data then have a link to next five / previous etc. I've included the script I have below. I would like to add I have found articles on how to do this, but my problems is i don't knowwhere I should be editing the below code. I have tried several examples but just keep getting errors. Code:
View Replies !
Str_replace - Add Some Content On The Page To Show What You Have Submitted?
I had this wacky idea to have a pull down that keeps the same values when previewing what they have select in the post (ie. Webmaster World's 'Preview' Button When you post It has the same value of what u put in it when you add some content on the page to show what you have submitted) My Code: $genre_pulldown = "<select name="genre" id="genre"><optgroup label="Genre"><option value="Yo Mama">Yo Mama</option><option value="Blonde">Blonde</option><option value="Political">Political</option><option value="Religious">Religious</option><option value="knock Knock Jokes">knock Knock Jokes</option></optgroup></select>"; if(!isset($_POST['genre'])){ echo $genre_pulldown; } else{ $genre_pulldown = str_replace('{$_POST['genre']}"', '{$_POST['genre']}" selected', '{$genre_pulldown}');//LINE 81 }
View Replies !
Problem With Include - Register Page Doesn't Show Up
I am trying to include a page, but for some reason it is not working. Here is my code: <?php if ($page=="") { echo "<center>Starbits Pets is currently upgrading to V2, so we will be down for a while, come back later!"; } elseif ($page=register") { include ("html/register.html"); } else { echo "That is not a valid location!"; } ?> The register page doesn't show up I have tried almost everything I can think of, and it still doesn't work.
View Replies !
Show The Current Time At The Resort On His Home Page.
I have a client who owns a resort in the Philippines. This client wants to show the current time at the resort on his home page. How would this be done with PHP? Is it some calculation based upon GMT? I think (I'll have to check) that the Philippines is +8 GMT...so is that what you'd have to do: create a snippet that grabs the current GMT and add "8" to it?
View Replies !
Showing Database Records As Links To A Page To Show Relevant Detail
What I currently have is list of players what I want to do is make each player a hyperlink to a page with their details on. The hyperlink would be like this www.mydomain.com/playerDetails.php?playerID=1 and it would display the player with playerID 1. I have seen this on lots of sites and would like to know how this is done, can anybody recommend me any tutorials or write me a short script to do this.
View Replies !
Checkboxes - Show A Tick In The Boxes To Show That They Have Already Been Added.
I have been trying to learn checkboxes and arrays, and I've finally figured out how to add the checkboxes to the database. I currently have two forms addlinks.php and modifylinks.php and I have a dolinks.php that submits my data to the database. What I would like to do now is on my modifylinks page show a tick in the boxes to show that they have already been added. At the moment if I dont tick any boxes on modifylinks.php it deletes my previous data, and I have to retick them everytime I do an update. Code:
View Replies !
Show Table Only If There Is Data To Show?
I have a table that shows specific data (via a while loop) however, when you first log in as a new user, you see the table column headers but there is obviously no data, and it looks a bit unsightly. How could i take this code:
View Replies !
Show First 10 Records, Then Show The Rest
Is it possible to show a fixed number of rows in a repeat region, then show all the rest? What I mean is - I've got between 40 and 50 records in a database and it's easy to show them 10 at a time. But what I'd like to do is show the first 10, then show all the rest in one go. Code:
View Replies !
Depending Checkboxes
I have one MySQL table from where I pick project names and then list them in a combo box (menu). Depending on what project a user would pick he would then pick a task, that exists in that project (another table for projects). Concept is quite simple but very hard to implement since internet is stateless. The simplest way would be to pick a project from the first combo box. Depending on what project I would pick the content of task combo box would be adapted. Maybe this could be done with javascript but I don't know how. Maybe I should forget this concept and do it with step by step picking. New page for each pick.
View Replies !
Depending On Browser
I want to show an image for IE-users and no image for all other users, how can I do that in PHP? I guess that I should use the useragent, but there is very many different types of useragents so I though maybe someone knows a premade script or function for this. Or maybe there is some really simple way.
View Replies !
If Statement Depending On Domain?
I've got webspace with multiple domains pointing to it. Domain A points to one directory. Domain B points to another directory. I've got identical sites running in each directory and I'd like them to remain identical. However, some links need to change depending on which directory they are in. I don't to manually change these links every time I make an update. What argument would I use in an if statement?
View Replies !
$http_response_header Differs Depending On OS
I'm making a HTTP request to a source where I get redirected. Let's assume this page is "https://www.example.com" and it redirects me to "https://www.example.com/redirect.html". My request looks like this: $html = file_get_contents('https://www.example.com'); Now, when I print out $http_response_headers I get different output on MacOS/Linux and Windows: MacOS/Linux: HTTP/1.1 302 Found Connection: close Date: Mon, 26 Feb 2007 15:28:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Location: /redirect.html Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 266 HTTP/1.1 200 OK Connection: close Date: Mon, 26 Feb 2007 15:28:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 7830 Windows: HTTP/1.1 200 OK Connection: close Date: Mon, 26 Feb 2007 15:28:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 7830 So on Windows I only get the header of the last page I was redirected to. But I need all the headers on Windows. Does anybody know which setting is responsible for that? In both cases (MacOS 10.4 and Windows XP SP2) I am using the latest XAMPP.
View Replies !
Display Image Depending On Url
I am a complete newby to php and Im trying to learn how to do something, here is what im trying to achieve. something like: if url="page1.php" then print("<img src="image1.gif" alt="image1">"); if url="page2.php" then print("<img src="image2.gif" alt="image2">"); if url="page3.php" then print("<img src="image3.gif" alt="image3">"); I know its wrong but you get the idea. Ive searched around google etc for some kind of example but I can't find anything, can anyone help me go in the right direction?
View Replies !
Redirect Depending On Domainname
How can I fix so that when a user types in www.domain1.com he's taken to that place and when he types in www.domain2.com he take to that subfolder, but the name in the addressbar is www.domain2.com. I've got the 2 names, but on the same server.
View Replies !
|