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 Complete Forum Thread with Replies
Related Forum Messages:
Redirected Back To The Same Register.php And The Image Doesn't Reload (change).
I have a security script which generates images with random numbers (everything works fine), and when the registration is finished user gets redirected back to the same register.php and the image doesn't reload (change). here is a part of my code: // security code $ivalfrom =ord("a"); $ivalto =ord("z"); for($i=$ivalfrom; $i<=$ivalto; $i++){ $arralpha[] = chr($i); } $rand_al = array_rand ($arralpha, 3); $strrandom = $arralpha[$rand_al[0]] . $arralpha[$rand_al[1]] . $arralpha[$rand_al[3]]; $numpart=mt_rand(10,99); $strrandom .= $numpart;
View Replies !
Line Breaks Doesn't Show Up
I have a script that allows users to post ads and stuff, but the thing is when they go to the description and fill that out if they want to enter a space like this. it doesn't show up, it acts like it was on the same line. How can I fix this?
View Replies !
OsCommerce Doesn't Show The Carts Contents
When the View Cart Button Is clicked, or when someone adds something to the cart, The page is displayed, but I doesn't show the carts contents, it shows the page header the left side column (It may show the footer, but Im not sure), but nothing else. Im not sure if it is creating a error message, because in the .ini file I think error output is turned off, and I don't have permissions to edit the file. I know where the error log is, but if I try to open it from the server, I would have to download a 117MB file, and that will take forever to download, and take up a lot of space on my computer.
View Replies !
Doesn't Show Where The Exact File Is In The Status Bar?
I have a download script which contains header("Location: path/to/file.zip"); However when the user downloads the file it show the direct url to the file in the status bar. How can I make it so it doesn't show where the exact file is in the status bar? Someone suggested I use headers to solve the problem a while ago but I am unsure how.
View Replies !
Include - Why Does Some Parts Doesn't Complete?
I have a code. Can you tell me why does some parts doesn't complete? if ($include=="123"){ include ì«.php' // COMPLETES } if(isset($_GET['include']) && file_exists($_GET[ì«'].'.php')) { include($_GET[ì«'].'.php'); // UNCOMPLETES (WHY) } else { echo $result2[0]; // COMPLETES }
View Replies !
Include/Show File
I'm looking for a script that will switch out gif images depending on the date. For example, November through December, the site will show a Christmas image. Then mid January though Feb 14th, a Valentine's day image. Can anyone recommend a script? I tried searching for one but I must be using the wrong keywords.
View Replies !
Register Page Using $_POST
I made a register page but for some reson im getting this error: Parse error: syntax error, unexpected T_ELSEIF in /home/deathsta/public_html/register.php on line 81 As normally you would think its a simple error like a missing ";" or "}", well its not(i think) here is my code:
View Replies !
Include (Change Include File Within The Page)
I am working on a website that requires the use of include files, i have the include html files ready and can properly show them in the page but I am looking for a way to have a menu on the page where the user can choose which file he would like to read, I dont want to have multiple pages I would like to just have the actual php include code change when the user picks the file he would like to read. Anyone know of a way to do this?
View Replies !
Typo3: Generate Dynamic Website, Show Only The Pages That Include Content
i want to create a web form where someone can do some input or pick strings from select boxes. after that the person can click a preview button and a website will be generated dynamically. so i thought i should use typo3. first of all i created a html-template. then a page tree with all the sites that could possibly appear. in the end only the sites with content, will be shown. all of this must happen automatically. so i need a php script or a typoscript that compares the "pages" table with the "tt_content" table. after that the attribute "hidden" in the "pages" table should be "true" for the pages that doesn't contain any content. does anyone have an idea if this is possible or if typo3 is the right choice?
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 !
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 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 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 !
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 !
How To Include A Page
I want my site to have a template so I'll use this format: http://www.site.com/index.php?page=bio I want that to mean that it will just include the bio.php page into the middle of index.php, which will be like a template. I hope you guys can understand this. This is my question. Is there a way to only let people see bio.php if it's included in index.php and NOT let people just go directly to http://www.site.com/bio.php?
View Replies !
Include A Page
I want to replace the frames in my current webpage. So I borrowed some script from wordpress (blog php) and created Leftmenu.php - index.php - Rightmenu.php With css file it makes the style. So far all well. In the leftmenu.php I want to make a link with is included in the index.php. In some examples I see: <a href="index.php?page_id=3" >link page 3 </a> can I replace page_id=3 for another command to open a file called e.g. "page2.php" ?
View Replies !
Include Page
I am having some trouble with including a file from a external webpage. I have two servers on the main server I have set a session variable (eg. $name)on that server I have a file that reads: session_start(); echo "hello " . $_SESSION['name']; when I run this on the main server it prints the value of $name as expected. eg. "hello john" . When I include this file from a external page. it does not print it out, it only prints out "hello" and nothign else. even though the session value has been previously set on the main server. Is this something I am doing wrong , or is that just the way it works when including from external pages. Is there a way to get the value of session values like this? I also tried readfile and that produced the same result, no session values when including from a external page.
View Replies !
2 Include On One Page
I havent been working with php for very long and now I am stuck, I want 2 include on the page, one is for my visual menu and the other is for the news and content. What I want is for the the visual menu just to change when the tabs are clicked but not the news page, unless it was clicked via the main navigation.
View Replies !
Include Page Into A Variable
I'm trying to automatically generate an email that includes information from a few different pages on my site. I'm creating a variable $message to contain the email output. I would like to set the variable with html and then include a webpage inside the variable then echo the variable $message. i.e. $message = " <html> <body> Stuff in here but somehow include('cal_events.php') </body> </html>"; mail("someone@somewhere.com", "Subject", "$message","header info"); Can I get the informaion from an included page into the $message variable?
View Replies !
Include Php Page With Variable
I don't know if this is possible but I want to include a page with a variable. Like: <?php include('somepage.php?variable=whatever');?> How ever this gives me error (cannot be opened)Is this possible?
View Replies !
Better Way To Include A Lot Of File In One Page?
does anyone have a better way to include a lot of file in one page? i got a page with a lot of scripts and everything I'm going to use one i have to include it so my page is staring to look like this include_once($_SERVER['HTTP_HOST'].'/function/header.php'); include_once($_SERVER['HTTP_HOST'].'/function/up.php'); include_once($_SERVER['HTTP_HOST'].'/function/ad.php'); include_once($_SERVER['HTTP_HOST'].'/function/seven.php');
View Replies !
Include Referencing Page
Not sure if php is the ideal solution, but here goes. Basically,what I want to do is link to a form from various, static, html pages and include the referencing page name somewhere in the form result. Pages abc.html, def.html and ghi.html all have a 'further information' link, which leads to a form. How could I include the reference abc, def, or ghi, in the form result, so I know what they want more information about? It wouldn't matter if the .html is tagged on the end of the reference.
View Replies !
Include Another Page With Equire_once
I have this page, template.php. On the page I can include another page with equire_once, like this: <html> <head></head> <body> <?php require_once ("mypage.html"); ?> </body> </html> This works fine, no problem. But when I change it to: <?php require_once ("$page.html"); ?> and use the url www.xxxxxx.com/template.php?page=mypage to get it, the browser doesn't return anything. Acually it stops right before the php code, and only writes out: <html> <head></head>
View Replies !
Include A Dynamic Page
I am reworking a shoutbox script (removing it from the Iframe). I have a small problem thou. I am using seperate includes. One for the form and the other to display the shouts. The thing is to display the shouts properly i need to display tags.php?show=limit. When I try to include this PHP Code: <?php include("tags.php?show=limit"); ?> It just displays tags.php. Is there a trick to this? Can it be done?
View Replies !
Include Java Page
i am using include to include a chat page which uses java, problem is when i load the page it does not load the java at all but i have found that with incldue you need to include other stuff but do i need to somehow where the include code is include the java files.
View Replies !
|