Jump to content

Using the same database as ASP

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Pedro Amorim

Pedro Amorim

    Newbie

  • Members
  • Pip
  • 4 posts
Hy,

I'm building a simple web page in php to a friend. He bought a website build in asp, and access database. Two things I'm not familiar with, and I need your help to make the database connection with code only, if possible.

The code is this:


<body align="center">

<form method="POST" action="mypage.php">

   <table cellspacing="0" cellpadding="2" bgcolor="#FFF" width="90%">

     <tr>

       <td class='titulo2l'> Name: </td>

       <td colspan="3" ><input type="text" name="name" class='titulo2a' /></td>

     </tr>

     <tr>

       <td class='titulo2l'> Address: </td>

       <td  colspan="3"><input type="text" name="address" class='titulo2a' /></td>

     </tr>

     <tr align="center">

        <td colspan="2">

            <input type="submit" value="Send"/>

        </td>

        <td colspan="2">

            <input type="Reset" value="Clear"/> 

        </td>

      </tr>

   </table>

</form> 


$name = $_POST['name'];

$address = $_POST['address'];



#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts

Pedro Amorim said:

Hy,

I'm building a simple web page in php to a friend. He bought a website build in asp, and access database. Two things I'm not familiar with, and I need your help to make the database connection with code only, if possible.

The code is this:


<body align="center">
<form method="POST" action="mypage.php">
   <table cellspacing="0" cellpadding="2" bgcolor="#FFF" width="90%">
     <tr>
       <td class='titulo2l'> Name: </td>
       <td colspan="3" ><input type="text" name="name" class='titulo2a' /></td>
     </tr>
     <tr>
       <td class='titulo2l'> Address: </td>
       <td  colspan="3"><input type="text" name="address" class='titulo2a' /></td>
     </tr>
     <tr align="center">
        <td colspan="2">
            <input type="submit" value="Send"/>
        </td>
        <td colspan="2">
            <input type="Reset" value="Clear"/> 
        </td>
      </tr>
   </table>
</form> 

$name = $_POST['name'];
$address = $_POST['address'];
This is not valid code

You need to put your PHP Code in php tags.
PHP: Escaping from HTML - Manual

Connecting to access?
PHP: ODBC - Manual

Connecting to MSSQL?
PHP: Mssql - Manual




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users