Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win



Posted on 2002-04-13
Medium Priority
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
Question by:almaha
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
LVL 32

Accepted Solution

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



Expert Comment

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


Expert Comment

ID: 6944013
 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.


 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.

Author Comment

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!

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 …
Suggested Courses

636 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