Results 1 to 4 of 4

Thread: How to convert an .ASP form to PHP

  1. #1
    Join Date
    Jan 2008
    Location
    Central New Jersey
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to convert an .ASP form to PHP

    Hi superior beings, I need some help with converting an .ASP form for adding editing, and deleting real estate listings for a client site, but am unsure of how .ASP is formulated to work, and my PHP skills are low, but the end result needs to look like one of these http://www.collisonrealty.com/listin...L28039168.html including generating those "otherrooms" pages once submitted, and of course the agents need to edit or delete them as well.

    I have converted this full .ASP site to html pages, but this is my stumbling block at the moment.....any ideas?

    Here is the original "add listing" form to go by....

    HTML Code:
    <html>
    <head><meta name="description" content=" "><title>Add Your Listings!</title>
    </head>
    <body BGCOLOR="#000066" text="#000000" link="blue" vlink="blue">
    <!---------PRELOAD INFORMATION-------------->
    <center><img SRC="addalisting.jpg"></center>
    <BR>
    <!-- Start of the Append Form -->
    <form METHOD="POST" ACTION="add2.asp">
    <input TYPE="hidden" SIZE="40" NAME="gate" value="3/27/2009">
    <center>
    <TABLE border=2 bgcolor=003163><TR><TD>
              <table bgcolor=FFF99D  width=500>
                <tr> 
                  <td ALIGN="right"></td>
                  <td> 
                    <input TYPE="hidden" SIZE="40" NAME="SITEID" value="xxxxxxx">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right"></td>
                  <td> 
                    <input TYPE="hidden" SIZE="40" NAME="USERID" value="xxxxxx">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right"></td>
                  <td> 
                    <input TYPE="hidden" SIZE="40" NAME="password" value="xxxxxx">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">E-Mail Address:</td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="EMAIL" value="xxxxxxxxx.net">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Website Address: <font COLOR="red">http://</font></td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="URL" value="xxxxxxxxxxx">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Office Name: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="BKRCODE" value="xxxxxxxxxxxx">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Office Phone #: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="OFFPHN" value="xxxxxxxxx">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Agent Name: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="ANAME" value="xxxxxxxx">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Agent Phone #: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="APHONE" value="xxxxxxxxx">
                 </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Property Address: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="ADDRESS">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Location/City/Area: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="AREA">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">MLS or ID#:</td>
                  <td> 
                    <input TYPE="text" SIZE="20" NAME="MLNUM">
                    &nbsp;&nbsp;&nbsp VISIBLE? 
                    <select name=MLNUMVISIBLE>
                      <option>NO</option>
                      <option>YES</option>
                    </select>
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">List Price or Monthly Rental: $</td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="LPRICEA">
                 </td>
                </tr>
                <tr> 
                  <td colspan=2 align=center>(NO COMMAS or DOLLAR SIGNS in LIST PRICE!!!)</TD>
                </TR>
                <tr> 
                  <td ALIGN="right">Year Built: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="YRBLT">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Acres/Lot Size:</td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="ACRES">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Square Footage:</td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="SQFT">
                  </td>
                </tr>
                <TR> 
                  <TD align="right" height="28" colspan="2"> 
                    <div align="left">(<font color=red>NOTE: new rental categories 
                      give a better breakdown of the type of rentals. If you would 
                      like your website to have different links for each type of rental 
                      just contact us.</font>)</div>
                  </TD>
                </TR>
               <TR> 
                  <TD align="right" height="28">Property Type:</TD>
                  <TD height="28"> 
                    <select name=typex>
                      <option value="residential">Residential</option>
                      <option value="newhome">New Construction</option>
                      <option value="land">Land</option>
                      <option value="commercial">Commercial</option>
    
                      <option value="manufactured">Manufactured Home</option>
                      <option value="multiplex">Multiplex</option>
                      <option value="condo">Condominium</option>
                      <option value="rental">Rental</option>
                      <option value="singlefamilyrental">Single Family Rental</option>
                      <option value="multifamilyrental">Multi-Family Rental</option>
    
                      <option value="commercialrental">Commercial Rental</option>
                      <option value="fsbo">For Sale By Owner</option>
                    </select>
                  </TD>
                </TR>
                <!--
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="residential" checked></td><td>Residential</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="newhome"></td><td>New Construction</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="land"></td><td>Land</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="commercial"></td><td>Commercial</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="manufactured"></td><td>Manufactured Home</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="rental"></td><td>Rental</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="multiplex"></td><td>Multi-Plex</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="condo"></td><td>Condominium</td></tr>
    <tr><td ALIGN="right"><input NAME="typex" TYPE="radio" VALUE="fsbo"></td><td>For Sale By Owner</td></tr>
    -->             <tr> 
                  <td ALIGN="right"># of Bedrooms: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="BED1">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right"># of Bathrooms: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="TBATH">
                  </td>
                </tr>
               <tr> 
                  <td ALIGN="right">Style:</td>
                  <td> 
    End part 1
    Last edited by Snookerman; 05-04-2009 at 05:14 AM. Reason: added [html] tags

  2. #2
    Join Date
    Jan 2008
    Location
    Central New Jersey
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Part 2

    HTML Code:
     <input TYPE="text" SIZE="40" NAME="STYLE">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">View:</td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="VIEW1">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">Waterfront: </td>
                  <td> 
                    <input TYPE="text" SIZE="40" NAME="WTRFRT1">
                  </td>
                </tr>
                <tr> 
                  <td ALIGN="right">MAP CODE:<BR>
                   <a href="howmap.htm" target="_new">(help)</A></td>
                  <td> 
                    <p>
                      <textarea NAME="mapcode" ROWS="5" COLS="40"></textarea>
                    </p>
                    <p><a href="http://maps.google.com/" target="_blank">INSERT MAP CODE TOOL - CLICK HERE </a></p></td>
                </tr>
                <tr> 
                  <td ALIGN="right">Comments:</td>
                  <td> 
                    <textarea NAME="remarks" ROWS="5" COLS="40"></textarea>
                  </td>
                </tr>
              </table>
    <TABLE bgcolor=FFF99D width=500>
    <TR><TD align=left COLSPAN=4>
    <HR>
    <font size=+3>PICTURES:</font><BR>
    <B>Check the box if you plan on uploading a photo.  You can mark as many boxes as you want.  If you mark 3 boxes, then you will need to upload 3 photos.  If you do not have any photos at this time, you can upload the photos later by using the CHANGE A LISTING section.</B><BR>
    <input NAME="pic" TYPE="checkbox" checked>PRIMARY PHOTO</TD></TR>
    
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic2" TYPE="checkbox">PICTURE 2</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic2desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic2sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic3" TYPE="checkbox" >PICTURE 3</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic3desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic3sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic4" TYPE="checkbox" >PICTURE 4</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic4desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic4sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic5" TYPE="checkbox" >PICTURE 5</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic5desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic5sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic6" TYPE="checkbox" >PICTURE 6</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic6desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic6sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic7" TYPE="checkbox" >PICTURE 7</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic7desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic7sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic8" TYPE="checkbox" >PICTURE 8</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic8desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic8sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic9" TYPE="checkbox" >PICTURE 9</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic9desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic9sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic10" TYPE="checkbox" >PICTURE 10</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic10desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic10sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    <tr><td ALIGN="left" nowrap valign=top><input NAME="pic11" TYPE="checkbox">PICTURE 11</td><td colspan=3>SHORT DESCRIPTION (i.e., Kitchen, Living Room)<BR><input TYPE="text" SIZE="20" NAME="pic11desc"></TR>
    <tr><td align=left></td><td colspan=3>FULL DESCRIPTION:<BR><textarea NAME="pic11sum" ROWS="3" COLS="40"></textarea></td></tr>
    <tr><td colspan=4 align=center><img src=bluebar.gif></td></tr>
    /TABLE>
    <table bgcolor=FFF99D  width=500>
    <TR><TD><HR></TD></TR>
    <tr><td align=center><B><U>MORE OPTIONS:</U></B></TD></TR>
    <tr><TD>FEATURED LISTING?    <select name=feature>
    <option>NO</option>
    <option>YES</option>
    </select></TD>
    <TR><TD>
    FEATURED LISTING DESCRIPTION:<BR>
    <textarea NAME="featuredesc" ROWS="5" COLS="40"></textarea>
    </TD>
    <TR><TD><HR></TD></TR>
    <TR><TD>OPEN HOUSE?   <select name=openhouse>
    <option>NO</option>
    <option>YES</option>
    </select>
    <BR>
    DATES/TIMES:
    <input TYPE="text" SIZE="40" NAME="openhousetime"><BR>
    OPEN HOUSE DIRECTIONS:<BR>
    <textarea NAME="openhousedirections" ROWS="5" COLS="40"></textarea>
    </TD>
    </TR>
    <TR><TD><HR></TD></TR>
    <TR><TD>OTHER LINK: <FONT COLOR=red>(Virtual Tour, Video Link, Etc.)</FONT><BR>
    <FONT COLOR=red>http://</FONT><input TYPE="text" SIZE="60" NAME="otherlink"><BR>
    OTHER LINK DESCRIPTION:<input TYPE="text" SIZE="40" NAME="otherlinkdesc"><BR>
    </TD>
    </TR>
    R><TD><HR></TD></TR>
    <TR><TD> 
    <TABLE>
    <TR><TD COLSPAN=2 align=center><B>ADDITIONAL FIELDS</B></TD></TR>
    <TR><TD COLSPAN=2 align=center><FONT COLOR=red>(Example: TITLE = Land Tax  &nbsp TEXT = $1850/Year)</FONT></TD></TR>
    <TR><TD>Title</TD><TD>Text</TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield1"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield1a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield2"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield2a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield3"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield3a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield4"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield4a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield5"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield5a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield6"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield6a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield7"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield7a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield8"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield8a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield9"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield9a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield10"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield10a"></TD></TR>
    <TR><TD><input TYPE="text" SIZE="20" NAME="otherfield11"></TD><TD><input TYPE="text" SIZE="40" NAME="otherfield11a"></TD></TR>
    </TD></TR>
    </TABLE>
    <TR><TD><HR></TD></TR>
    <TR><TD align=center><B>UPDATES:</B></TD></TR>
    <TR><TD>STTUS:  <select name=status>
    <option>For Sale</option>
    <option>Sold</option>
    <option>Rented</option>
    <option>Sale Pending</option>
    <option>Application Pending</option>
    <option>Hidden</option>
    <option value="For Sale">For Rent</option>
    </select>
    </TD></TR><TR><TD colspan=2>PRICE REDUCED?  <select name=pricereduced>
    <option>NO</option>
    <option>YES</option>
    </select>
    <BR>
    NEW PRICE (purchase price or rental price): <input TYPE="text" SIZE="20" NAME="newprice" VALUE=0> 
    </TD></TR>
    <tr><td align=center>(NO COMMAS or DOLLAR SIGNS in NEW PRICE!!!)</TD></TR>
    </TABLE></TD></TR></TABLE>
    </center>
    <br><p>
    <center>
    <input TYPE="submit" VALUE="ADD LISTING">
    </center>
    </form>
    <!-- End of the Append Form -->
    </td></tr></table>
    </body>
    </html>
    Thanks in advance!

    TSG!
    Last edited by Snookerman; 05-04-2009 at 05:14 AM. Reason: added [html] tags

  3. #3
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    Is there an existing database?

    If not, have you decided which database to use?

  4. #4
    Join Date
    Jan 2008
    Location
    Central New Jersey
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well you see that is a part of the question for me as well, since I see no query strings that open and close a DB connection, I am thinking there is not one involved, but by the same token how or from where are these existing listings accessed from by the real-estate agents and broker to edit or delete them and where are they stored? You see when I log in to the listing input page, I also do not see it query a DB to list those which are available for editing, however a list does come up of all existing listings, and since I am highly ASP ignorant at this time, i am unsure as to how these processes function, and therefore may only be unable to recognize that access to it.

    However since I am going to use PHP for this aspect of this site's functions, how do you suggest I proceed, meaning I go ahead and create a MySQL DB, that's no problem, but I am unsure as to how to use the script, once the input page is scripted, to generate the html pages that should result from their use of the add, edit , delete listing functions from that page?

    I guess it is my struggling with using PHP to generate the html page based on the criteria entered in the form that creates the listing in the first place, I have been learning HP but my skill level is poor, although I can modify existing scripts rather creatively, there are aspects I do not know how to interpret, so creating an original one from scratch is my most current obstacle, but I cannot afford the time to change anywhere from 5 to 18 pages every time an agent needs to update, change, or add a new listing, so if you can possibly point me to some kind of comprehensive tutorial for such a purpose, I might get to accomplish this much sooner than my current floundering, since I have tried reviewing script libraries for some similar example, but have not encountered a suitable one, but again maybe I am just not recognizing it for what it is either.

    If you need additional code or the url of the original page scripts in .asp I can provide it since the previous hosting service seems to not have removed these pages yet. But I cannot offer a log-in password for obvious reasons, so any code you need to look at will need to be from my supplying it.

    I really appreciate the help here, I am not doing this to get out of doing the work, nor for the hosting income, but this was more of rescuing a woman from a shark that was taking unethical advantage of her lack of knowledge, and complete dependence on him after the loss of her husband three years ago, for which he has charged her ridiculous fees for simple services until I became friendly with her and questioned some of those, and then researched to find she was not allowed access to her server files, and he was charging $100.00 to add a keyword title and description meta tags, once she provided the input for them, and then further researched based on that as to why, which was because he was hosting for pay, 13 other sites in her server folder as add on domains, as well as peppering her site pages with links to his sites, and whenever anyone mistyped a url to a page it would re-direct automatically to one of his other sites as well, so this guy was neither honest or up front about anything he presented to her, and my work contributions aimed at helping her with some SEO, won her loyalty and therefore desire to allow me to host her sites.

    I really appreciate any time and help with this situation, as I want to get this working and free my time from these interruptions to the work I am doing on other sites I need to complete for my other clients!

    You guys Rock!

    TSG!

Bookmarks

Posting Permissions

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