New to PHP - trying to convert from ASP.net
Results 1 to 4 of 4

Thread: New to PHP - trying to convert from ASP.net

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    4

    Question New to PHP - trying to convert from ASP.net

    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.

  2. #2
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    13,911
    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 hes a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html


    eBookworm.us

  3. #3
    Senior Member
    Join Date
    Apr 2003
    Location
    Silver Lake
    Posts
    4,851
    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.
    IMPORTANT: STOP using the mysql extension. Use mysqli or pdo instead.
    World War One happened 100 years ago. Visit Old Grey Horror for the agony and irony.

  4. #4
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    13,911
    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 hes a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html


    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •