Does PHP have simple buttons to redirect users to another page?
In ASP.net, I just create a link button that redirects the user to the next page.
I haven't found anything like this yet in PHP. (I am very new... just a few days into PHP now.)
Suppose I have a main page to my site that directs users to a second level page where they can join or a different second level page where they can do a search.
What's the best way to do this in PHP? Like I said, with ASP.net, I would've just created two LinkButtons.
Not sure even where PHP comes into the picture here. Isn't that just an HTML issue, or is there more to the question than meets the eye here? Many PHP frameworks or stand-alone 3rd party PHP classes have functions for creating HTML elements, which might be the sort of thing you're used to within the ASP.NET framework, but it's not part of the core PHP language.
Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett
"But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html
As I understand it, ASP.NET is all about an integrated suite of technologies (e.g., C#, HTML, javascript, CSS, etc.) and you interact with all of them via one of microsoft's Integrated Development Environments (IDEs) such as Visual Studio. While this offers extraordinary convenience in some cases, it also isolates you from the underlying technologies. The IDE gives you convenient functions like "insert linkButton" and then handles all the details of writing some HTML, writing some Javascript, etc.
PHP is not like this. My understanding (and someone correct me if I'm wrong) is that PHP comprises a programming language called PHP and the PHP runtime which takes your PHP scripts and compiles them into byte code and then runs that code for you, either inside an apache module or perhaps from the command line.
The 'button' that you talk about is something that is displayed as HTML. It would be up to you to create a PHP script or HTML that displayed a a button and then assign some Javascript to it (or perhaps put it in a form which submits to the second page) or maybe you could just create an HTML <a> tag that looks like a button. There are a number of ways to do this, each with its own advantages and disadvantages.
You might be able to find some kind of IDE for developing PHP that offers you that kind of fully integrated convenience, but I don't know of any.
Delphi for PHP has a WYSIWYG, Visual Studio type interface, I believe; but I've never used it, so can't really do more than speculate.
Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett
"But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html
Bookmarks