Solved

location

Posted on 2002-04-13
4
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
history of pages 7 49
How do I add date to text file name 15 26
How can I use javascript variable in mysql query 21 36
sitemap.xml 3 26
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
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.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

739 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