On If Statement Open .htm Page?
how to open a preset page from an if statement, such as:
if ($row["password"]==$password ) {
printf("Successfully Logged In!");
}else{
print("Login failed!");}
where instead of just printing the text string it opens a new page!!
View Complete Forum Thread with Replies
Related Forum Messages:
Script To Open A Small Page When Loading A Large Page?
the idea is a script that loads when a large page is trying to open that need for example 5-6 mins to load and in the mean time to open a very small page that is saying loading the page please wait and when the large page is loaded to go directly to that page. Do u get my idea?
View Replies !
How To Open Page
I want to send the browser to a differnet page how do i do this with php? it's an if statment if true send to example1.com else send to example2.com.
View Replies !
Open A New Page?
I have a small problem, this is my current script: {$_SESSION['login'] = $_POST['login']; $login='You are now logged in <b>' . $_SESSION['login'];} else{ $login= 'Wrong user name or password.';} If the user name or password is incorrect, it will just display Wrong user name or password. But what I want it to do is have the browser open a new page if it is incorrect, for example incorrect.php. Which will then display an incorrect user name or password message. This shouldn't be too complicated, I just have no idea how to go about it.
View Replies !
IE Ask To Open The (php) Page As File
I just uploaded a new website onto a new server. On this server however, when you click on the only 2 php pages. IE will ask to open the page as file. Is there a simple way to fix this, or is it simply the new server that can't support php? The two pages are just a simple email form.
View Replies !
Open A Page In Grayscale On Mac...
I've having a serious issue that I need your help with as soon as humanly possible. I have a page that has some products on it, when the product is clicked, it opens up the printable version along with the print dialog box for printing. My problem is, I need the page to open up in grayscale. It's working in IE, but it's not working in Fire Fox, and it's not working on Mac.
View Replies !
Orig. Page Open
Usually when I use header it just replaces the current page, but now with this code it opens a new tab in firefox and puts in the page there, leaving the original page in the original tab. What can be the cause of that? code: if ($_REQUEST['returnitems']) { header("Location: http://" . getenv(HTTP_HOST) . "/index.php?section=admin&action=returns"); }
View Replies !
Open Page In Frame
i would like to open a page always inside a frame. This can be achiieved with a simple javascript <SCRIPT LANGUAGE="JavaScript"> <!-- if (self == top) { location.replace("index.htm"); } // --> </SCRIPT> However this can cause a popup depending on the user's browser settings
View Replies !
Open Feedback Page
i am trying to open feedback page after a user visiting a particular site( that means when a particular user close all pages after see the ste and at last i want to open the feed back page).
View Replies !
Open And Process Remote Page
I want to be able to ask users for a URL, open that page, change some of the contents and then display that page as if they had typed the URL into a browser. I have toyed with some of the php functions for opening URLs, but what I am not clear on is how much work my script will have to do (do I need to fully emulate a browser, for example). The net effect I am after is very similar to the page translation feature that Google offers. Does anyone have any examples of this kind of technique. Any ideas how much work is involved? (My 'translation' is pretty trivial, so really it is mostly a question of how much work to display the remote page).
View Replies !
Open Link In Included Page
How to include Link that could open in same page rather than going to another page for example, if i include a file in home.php <? include("/index.php") ?> and I want to open up the LINKS in "index.php" in same home.php. example - open "/index.php?p=Hits" on same home.php page I know i could have FRAMES but i dont want to frames in my site
View Replies !
How To Get Rec Id And Use Header() To Open New Page And Pass Rec Id
1. After the record is inserted I would like to open page_add.php and pass the record id (there is an auto_increment field in the table called ID) to the new page "page_add.php". I was thinking of using header() to open the new page and passing the id as parameter (i.e. page_add.php?rec_id=what ever) is there a better way to do this? 2. how would I get the record id after I store the new record? 3. Also not sure how to write header() with a variable in it? Code:
View Replies !
How To Open Random Flash Page Using Hyperlink?
I'm new to using PHP so please bear with me. I'm trying to create a hyperlink that will open a random Flash page so that users will see a different flash module each time. Here is some of the code that I wrote but I'm not sure if it'll work since I'm not very good at coding. Oh yeah, I'm not using a database either. // random_menu.html <head> <?php $i = rand(0,3); ?> </head> <body> <a href = "www.x.com/random.php?i=$i">x</a> </body> --------------------------- // random.php <head> <?php $i = $_post["i"]; if ($i = = 0){ $value = "a"; } else if ($i = = 1){ $value = "b"; } ...etc. </head> <body> <object> <param name="movie" value="$value"> <embed src="$value"></embed> </object> </body> Please help if you know how to do this.
View Replies !
Text File To Popup Or Open In A New Page
I have a form which takes user input. On submit, the form will run a php script that will create a new text file using the user input. I want this text file to popup or open in a new page. The problem is that when the page opens it still shows the old text file, i need to hit refresh for it to show the last user input. the html file (greatly simplified): <html><head> <title>Untitled</title> </head> <body> <form action="action.php" method="post"> <p>Title: <input type="text" name="Title" /></p> <p><input type="submit" /></p> </form> </body> </html> The php file (simplified as well): <?php $spot_code = $_POST['Title']; // Open the file and erase the contents if any $fp = fopen("myfile.3dml", "w"); fwrite($fp, "<TITLE NAME=" . '"'. $spot_code .'"'. " /> "); fclose($fp); //redirect header( 'Location: http://localhost/mytest/myfile.html' ); ?> the text file, myfile.3dml is embedded in myfile.html (it requires a plugin to view - it's a 3D world). When myfile.html is opened it displays myfile.3dml but it needs to be refreshed to show the current input.
View Replies !
Reloading A Page In IF Statement / PHP
if ( $turns == 0 ) {} if i wana reload a page if this statement if true, with out the user havign to click any thing how can this be done? i tried if ( $turns == 0 ) { header('Location: main.php'); die(); } it doesn;t seem to be working]
View Replies !
If Statement - Page = Index
What I'd like to do is, on my website on the initial page, the index, I don't want to link back to the index to be a link. If there is a: If page = index then link not enabled else link enabled sort of possibility in php.
View Replies !
Redirect To Another Page With If Statement
I was hoping to get a little help structuring a script that I'm trying to devise. I'd like an if statement that basically says: If there is no ZipCode in the current record in the database, then go to the ZipCode entry page, otherwise keep loading the current document.
View Replies !
Page Redirect From Within If Statement?
I would like to have users login, and based on this login, if they're one type of customer I want to take them to pagex.php, if they're another, I want to take them to pagey.php. Since I don't know what type of customer they are until they've logged in, I can't redirect with the header function, so I thought maybe I could do it by grabbing their login info, and seeing if they're type x, then go to pagex.php if they're type y, go to pagey.php: Code:
View Replies !
Changing An If Statement To Html Page
How do I change the following code from my process page to a new page with the detials on it. I made a html page cut and pasted it into this spot but it did not work. What do I need to change in order for it to be a html page is shows. Code:
View Replies !
If Statement With Page Location (not A Redirect)
I have a menu that will swap with our login if now logged in. I can't just "take out" the menu code from update.php because of use of common headers. but on this page it's causing problems with our updating program, (can't handle the extra text fields on page). looking for a something like Code:
View Replies !
Open Popup Window When Page Is Loaded If A Field Is Populated
Would it be possible to open a popup window on loading the instruction page but only when the critical information section of the page contains text? The popup window could either contain the contents of the critical information section or just a visual warning that such information exists on the main page. I have a pretty good knowledge of VBA but sadly my knowledge of php and javascript is very limited.
View Replies !
Set The HTTPS Username And Password Using Php/flash And Then Open The Secure Page.
My hosts allow secure https logins on specific directories. What I want to do is have a login screen in flash, if the user enters the correct username and password I would like to set the HTTPS username and password using php/flash and then open the secure page. In my mind at this point they'll be logged in and then can navigate the secure page without seeing the browsers https login dialog. Am I kidding myself, or is this possible? They're config is the following: PHP Version 4.3.11 4.9-STABLE FreeBSD Zend Engine v1.3.0 Apache/1.3.33 (Unix) PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7c FrontPage/5.0.2.2635 mod_throttle/3.1.2
View Replies !
How Do I Return 10 Results Per Page Using SELECT Statement?
I'm wasn't sure whether to post this under the PHP or under the MySQL section of the forums. Since most people (I'm assuming) who write PHP script, also use MySQL, I thought I'd stick with PHP. I'm rather new to both PHP and MySQL and I'd be very grateful to anyone who can help me solve a problem I'm having at the moment. First, I'll give you an introduction to my little project... I'm developing a database in MySQL that is used to store the song titles of all the MP3s I have on my PC. I've written a basic search feature that works well. The user has 2 options: Either he can type a special "!ALL" "parameter", that I made up, to return all the songs in the database or the user may enter a few characters in the textbox and select "song title" or "artist" etc. from a dropdown to search for a specific song title or artist etc.. Hope you are following so far? Say for example the user presses submit after typing "!ALL" to return all the song titles - there could be hundreds of results. What I want to do now is display 10 results on a page, then on the next page another 10, etc. (like a real search engine!). I've tried doing it with the LIMIT statement, but like I said I'm new to this and discovered that that is not the right way of going about it. My question is this: how would I go about returning 10 matches per page? Do I use hidden form fields? What would the SELECT statement look like? What would the PHP scripting look like to setup the "back" and "forward" navigation between the result for the search?
View Replies !
Open On Open / Save Box Dont Work With Download Script
I have a download script. I'm storing files above webroot and using download script for making files available for download to users. Now the problem is that when file download open/save dialogue box comes... if the user clicks on save they can save the file and then they can open it without any problem . But if they click on open then they can't open the file. It says file path not found or there was some error file could not be open.....
View Replies !
Convert An IF ELSE Statement To A SWITCH CASE Statement?
How do I convert an IF ELSE statement to a SWITCH CASE statement? The switch case below doesn't work. $textlen = strlen($descr); if($textlen>10 && $textlen<50) { $completeness = 1; $deduct = 1000; } elseif($textlen>50 && $textlen<100) { $completeness = 2; $deduct = 500; } else { $completeness = 0; $deduct = 2000; } switch($textlen) { case >10 && < 50: $completeness = 1; $deduct = 1000; break; case >50 && < 100: $completeness = 2; $deduct = 500; break; default: $completeness = 0; $deduct = 2000; break;
View Replies !
If Statement Construction Within An Echo Statement
I have a form that is being used to "update" user info and I need the information to be pulled from the users table. In order to get the variables into the form, I am echoing it in and using an mysql array to place them into the form. at the t-shirt size part of the form the code is as follows ....
View Replies !
Statement Within An Echo Statement
I have a series of fields being drawn from a db and displayed on the page. I would like to insert an image if the value of one of the fields == 1 otherwise no image I can't quite get my head around the right way to do this. I know the following syntax is wrong, but this is what I'd like it to do: PHP Code: echo "<p>" . $itemname . "<br />" . $itemdescription . "<br />" . (if ($showitem == 1) echo <img src="image.jpg">; ) . "</p>";
View Replies !
Open XML Without The XSL
Is there a (simpel??) way to open an XML file WITHOUT parsing the XSL file in php? The file i want to open is: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="/layout/item-info.xsl"?> <page globalSearch="1" lang="en_us" requestUrl="/item-info.xml"> <itemInfo>...
View Replies !
Open A URL
I'm making a form and after they click submit, I'm using an if/else statement to verify that the username and password they entered are correct, if they are, I want it to open a specific webpage and then in the else statement, show a message and redirect them back to the form page. How do I use php to open a URL?
View Replies !
Open New Url With PHP
Ive never atempted or looked into using php to open a new page so i have no clue. I was wondering if anyone does know of a way of opening a new page with php? I wish to open up a new window when the user logins Also if your able to send $_POST data as well
View Replies !
|