TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-07-2008, 03:03 PM   #1 (permalink)
The Visitor
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Shinoken is on a distinguished road
Default Starting with php in my html page

Hello, I made the following page (plain html, no css or anything):

html4strict Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <title>.:: Ragnarok Society :: Home ::.</title>
  <meta content="Evrsoft First Page" name="GENERATOR">
</head>

<body bgcolor="#000000">

    echo "MySQL Working"; ?>
 <div align="center">
   <table style="WIDTH: 728px; font-face: Verdana" bordercolor="#FF0000" align="center" border="1">
    <tbody>
      <tr style="HEIGHT: 90px">
        <td colspan="5">
          <div align="center">
            <font face="verdana"><img height="90" alt="" src="http://www.talkphp.com/images/Banner3.png" width="728" border="0"></font>
          </div>
        </td>
      </tr>

      <tr align="middle" bgcolor="red">
        <td width="20%">
          <center>
            <font face="Verdana"><b>Home</b></font>
          </center>
        </td>

        <td width="20%">
          <center>
            <font face="Verdana"><b>Information</b></font>
          </center>
        </td>

        <td width="20%">
          <center>
            <font face="Verdana"><b>Forum</b></font>
          </center>
        </td>

        <td width="20%">
          <center>
            <font face="Verdana"><b>Downloads</b></font>
          </center>
        </td>

        <td width="20%">
          <center>
            <font face="Verdana"><b>Staff</b></font>
          </center>
        </td>
      </tr>

      <tr>
        <td valign="top" align="middle" width="20%"><font face="Verdana"><font color="red" size="-1">Login Server:</font><br>
        <font color="green" size="-1"><b>Online</b></font><br>
        <font color="red" size="-1">Char Server:</font><br>
        <font color="green" size="-1"><b>Online</b></font><br>
        <font color="red" size="-1">Map Server:</font><br>
        <font color="green" size="-1"><b>Online</b></font><br>
        <font color="red" size="-1">Users Online:</font> <font color="green" size="-1"><b>4</b></font><br></font></td>

        <td width="60%" colspan="3">
          <div id="cboxdiv" align="center">
            <iframe id="cboxmain" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" name="cboxmain" marginwidth=
            "2" marginheight="2" src="http://www5.cbox.ws/box/?boxid=26440&amp;boxtag=eh478a&amp;sec=main" frameborder="0" width="100%" height="100%" allowtransparency="">
</iframe><br>
            <iframe id="cboxform" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" name="cboxform" marginwidth="2"
            marginheight="2" src="http://www5.cbox.ws/box/?boxid=26440&amp;boxtag=eh478a&amp;sec=form" frameborder="0" width="160" scrolling="no" height="75" allowtransparency="">
</iframe>
          </div>
        </td>

        <td valign="top" align="middle" width="20%" height="50%">
          <table bordercolor="red" height="100%" width="100%" border="1">
            <tbody>
              <tr>
                <td>
                  <p><font face="Verdana" color="#FF0000">ID:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="public"><br>
                  <font color="#FF0000">Password:</font> <input type="public"></p>

                  <div align="left">
                    <font face="Verdana" color="blue" size="-2"><u>Sign Up!</u></font>
                  </div>

                  <div align="right">
                    <button><font face="Verdana" size="-1">Log In!</font></button>
                  </div>
                </td>
              </tr>

              <tr>
                <td>
                  <center>
                    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
                      <input type="hidden" value="_s-xclick" name="cmd"> <input type="image" alt="Make payments with PayPal - it's fast, free and secure!" src=
                      "https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit">
<img height="1" alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" border="0">
                      <input type="hidden" value=
                      "-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA+F6FU9Zxi7zAdLX2qe8zIm9VgWL8oYJMTwRD1kFGnc+2j6GHuEEwhlpNaUvCuQi15OJdZ5IU2TmvHF1uMYoWtpiEOsuerK6wVp6EB28KmwvCpmT3eGo6Aiu/Vpf7Kty09L+8pSXOGOfwtMPFyHW/gWUzus8zkbou0pWBSaQ/nLzELMAkGBSsOAwIaBQAwgcwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIHlBYC6qU79iAgai5l3LDvlQQVqh/wUaAHSvIMFUYr3X/mYUb/siOCh+titkAeQhlz4rP7tJ5U1lRSkmbuAqgZ2TYpFtM8dbrXj2uUBpySmLwwlQ9lpIevPSaW/i4R4deeHwDx9y+9W8qgdBcnBwGoc2sA7Yb0ue6XL8WO4HYq77ZiVFnOPla06baS69Yr142h03Fee0XrTpU88DolYkIh/Fqn/O+PIWzq3kOZKwgQ3885gegggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhb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GF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNzEyMjMyMDQ0MjRaMCMGCSqGSIb3DQEJBDEWBBQTNJCXX5XErLxDEiZQkoEEo4fmYzANBgkqhkiG9w0BAQEFAASBgJBirCbrZBihLS78ywnsRXuzBXzi4L7z9O3UcgcJgA4vo61K+dR0jqFrIVDzMd1TeOLQ60zKb0S/BFppDBGfejXvOAwzfs2fatIeAlyTGm9UcMY3y71w4+q5BrPoO3ynFSYkv+4isugoM3mHDL8sReTA9dXsxhb3t3U7ZM9WzyAe-----END PKCS7-----
  "

                      name="encrypted">

                    </form><font face="Verdana" color="#FF0000" size="-1">Billing Date: 02/02/2008<br>
                    Donation Status: $0/$27</font>
                  </center>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>

      <tr bgcolor="red">
        <td colspan="6">
          <center>
            <font face="Verdana">Latest News</font>
          </center>
        </td>
      </tr>

      <tr height="100%">
        <td colspan="6">
          <p><font face="Verdana" color="#FF0000">Here is the news displayed</font></p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>

          <p>&nbsp;</p>
        </td>
      </tr>
    </tbody>
  </table>
</body>
</html>

Now I need to let it connect to an mysql server to have an working login form and the server status working.

First I'd like to do an MySQL check (if the script works, by letting is connect under an wrong login)

putting this under <body>:
<?php $con = mysql_connect("localhost","die","nuthing") or die(mysql_error()); ?>

Saved, tested and nothing.. just the html page without the die message.

Anyone knows why it isn't working? (I have WAMP installed, PHP, Apache + MySQL, also tried it with just apache & php, no result either)

Thanks in Advance!

Your Sincerely,
Shinoken
Shinoken is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:48 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design