Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





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:
Web Page Open Up Automatically Using An If-statement
I was wondering if there was a way to have a web page open up automatically using an if-statement, either as a pop-up or just going to the page in the current browser window?

View Replies !
Open New URL In If Statement
How do I automatically open a new URL based on a condition being met ? i.e. what should the line 'open URL ... 'state? Code:

View Replies !
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 !
IF Else Statement - Form Being Submitted From Another Page And Being Directed To A Second Page
I have a form being submitted from another page and being directed to a second page. In this form is a checkbox called nonprofit. When checked the value is 1.

On the second page I have the following code:

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 !
Can't New Page To Open Using Button
Here is the code I have. Does anyone see anything wrong with it? It won't go to the url when clicked. Code:

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 A Page Using The Function Fsockopen()
I try to open a page using the function fsockopen(), however I the following output appears: "HTTP/1.1 302 Moved Temporarily". How can I get past this?

View Replies !
Shortest Code To Open A Web Page From PHP
I have Windows Vista and PHP with Curl.I would save a web page on my harddisk with a PHP command-line command. What's the more minimalist way to do it?

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 !
Verify With An If Statement What The Page Url Contains.
I am trying to verify with an if statement what the page url contains.

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 !
Search Script - Open A New Page Showing All Fields
let's say i have 3 fields : name , sirname , age.name is primary.i need to click on the result ,for example : george , and open a new page showing all fields.for example george lucas 35.Any ideas? Code:

View Replies !
Setup A Page When You Open A Drop Down Menu Of Options
How do I setup a page when you open a drop down menu of options, select an option and then an image on the page changes to the selection you landed on. Code:

View Replies !
How To Open Page And Make Sure Users Sees The Right Information
I'm making a website where registered users can upload a photo as well as information. The main page will display all of the users' photos. When user1 clicks on, say, user5's photo i want a page to open up and user5's information to be displayed. Is there a way to do this? Code:

View Replies !
How Can I Open A Source Of A Page (.html, Javascript ) In A Textarea
I need to find out how can I open a source of a page (.html, javascript ) in a textarea, edit the page and then submit it back to the server.

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 !
Reload (refresh) Page Within An If Statement
Is there a simple way in php to reload a page coded within an if statement.(see code below)It's very important that the session stays intact. 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 !
Page To Open In The Webshops Main Frame Instead Of Opening In A New Window.
When the user register himself for a newsletter at my webshop the webshop sends out an email with an activationkey. When the user clicks the activationkey in the email I want the page to open in the webshops main frame instead of opening in a new window. Is this possible?

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 !
Redirect To A Page Based On The Results Of An If Statement
I want to redirect to a page based on the results of an if statement. I have: PHP Code:

<?php
if (empty($vat_number)) {
echo "VAT number is empty"; /redirect to page1.php
} else {
echo "The VAT number is $vat_number"; /redirect to page2.php
}
?>

Does nauone know the best way to do this.

View Replies !
Passing Value To Function From Html Page Using If...else Statement
I am confused about passing a value to a function from an html page using the if..else statement.

I have tried searching for the php syntax for function calls with an if...else statement but have been unsuccessful. I have provided my code (which is wrong of course) Code:

View Replies !
Add A Confirm Statement For When People Click To Delete On My Page
I need to add a confirm statement for when people click to delete on my page. I can't seem to get it working where do I put the java tags etc. in the code below: PHP Code:

View Replies !
Statement To Redirect Users To Another Page When They Submit A Form
I need to use a redirect statement to redirect users to another page when they submit a form. Then on the next page I want to use the POST data, is this possible or is their a better way to do it? At the moment the form has action move() below.

function move()
{
header("Location: community.php");
    exit;
}

View Replies !
Write An Sql Statement That Reads All Orderlines With The Current Session ID Into The Web Page Using Php
I am trying to write an sql statement that reads all orderlines with the current session ID into the web page using php... I have the following SQL statement:
$sql = "SELECT sel_item, sel_item_qty, sel_item_price, sel_item_totalprice, date_added, phpsessid from user_track where phpsessid = "$phpsessid""; This doesn't work. Has anyone got any suggestions... this is pretty urgent.

View Replies !
Automatically Open Default Mail Program And Insert The Current Page Of Browser As The Body Of The Message.
On my website I would like the facility to click on an image or text that will automatically open up their default mail program and insert the current page on their browser as the body of the message.

I realise that most browsers will have this facility already but I would like to add my own method. Problem is, I have no idea on how to achieve this. I'm sure it can't be that difficult though. It maybe can be done just using HTML, I don't know.

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 !
How Many Connections Are Open And On What Pages They Are Open.
I know why I am getting this message. Is there any code I can write up to find how many connections are open and on what pages they are 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 !
Pass A Function As Array(&$sess_handler, 'open') Instead Of '$sess_handler->open'
In the function session_set_save_handler I can pass the name of function which deal with session. In Xoops code I see the use of this function like that: Code:

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 !
PHP Open XML
There is a new library to make Microsoft Office documents in
http://oxml.110mb.com

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 !
How Can I Open .exe?
How can I open .exe -file? I need only an simple php -code.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved