Solved

location

Posted on 2002-04-13
4
235 Views
Last Modified: 2006-11-17
i need the syntax for the location statement! i am not sure if this is a php or js :S
0
Comment
Question by:almaha
4 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 10 total points
ID: 6939080
Do you mean Javascripts "location" object?
----------------------------------------------
Set a new location of current page:

location.href='newPage.html';



0
 
LVL 4

Expert Comment

by:heddesheimer
ID: 6939772
maybe you need:
<?php
header("Location: http://www.mydomain.com/mypage.php");
?>

Marian
0
 

Expert Comment

by:campione
ID: 6944013
<?php
 
 header("Location: http://whatever");

?>


But just make sure of the syntax. Only double quotes, and another thing "DO NOT" send any output request before the header call. That's an error.

For eg.

<?php

 print "I just messed up the program.";
 header("Location: http://whatever");

?>

This one's gonna create an error. Just remove the print and its fine.

Hope this'll solve your problem if its for PHP.
0
 

Author Comment

by:almaha
ID: 6946612
noo :( you didn't get what i really need.
i don't want a header!
okay, i have a cancel button that i want it to link to another php file. but i don't wana do it as a usual html form!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
php error 27 55
$_GET call between URL 3 37
xml with php question 5 30
How do I update select listbox after search 2 21
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question