Jump to content

ASPF430

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ASPF430's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I edited some PHP code so the layout of a search form looked better, but now, when I push search, any criteria placed is actually submitted. I.e. Before, the results would show according the rental ranges the user placed and display the correct properties. AFTER editing, it just displays every property, no matter what! If anyone could help me, I would appreciate it so much - I have hardly no PHP knowledge! I really appreciate your time. The code is below...anyone know how to fix it? N.B. Its the first table with Min Bedrooms, Min Price and Max Price! (ignore advance search) <?php // no direct access defined('_JEXEC') or die('Restricted access'); JHTML::stylesheet('jea.css', 'media/com_jea/css/'); $use_ajax = $this->params->get('use_ajax', 0); if ($use_ajax ) { JHTML::script('search.js', 'media/com_jea/js/', true); $document =& JFactory::getDocument(); //initialize the form when the page load $document->addScriptDeclaration(" window.addEvent('domready', function() { refreshForm(); });"); } ?> <form action="<?php echo JRoute::_('&task=search&layout=default') ?>" method="post" id="jea_search_form" enctype="application/x-www-form-urlencoded" > <fieldset><legend><?php echo JText::_('Quick search') ?></legend> <p> <input type="radio" name="cat" id="renting" value="renting" checked="checked" <?php echo $use_ajax ? 'onclick="refreshForm()"' : '' ?> > <strong><label for="renting"><?php echo JText::_('I am looking to rent a Property') ?></label> </strong> </p> <?php if ( $use_ajax ): ?> </fieldset> <fieldset> <div align="left"></div> </fieldset> <div align="left"> <fieldset> <strong> </strong> </fieldset> <fieldset> <strong> </strong> <table width="520" border="0"> <tr> <td width="272"><strong>Minimum Number of Bedrooms </strong> </td> <td width="238"><strong> <select name="select" > <option value="1" selected>1 Bedroom/Studio</option> <option value="2">2 Bedroom</option> <option value="3">3 Bedroom</option> <option value="4">4 Bedroom</option> <option value="5">5 Bedroom</option> </select> </strong></td> </tr> <tr> <td><strong>Minimum Rent Per Calender Month </strong></td> <td><strong> <select name="select2" > <option selected>No Minimum</option> <option value="400">£400pcm</option> <option value="500">£500pcm</option> <option value="600">£600pcm</option> <option value="700">£700pcm</option> <option value="800">£800pcm</option> <option value="900">£900pcm</option> <option value="1000">£1000pcm</option> <option value="1200">£1200pcm</option> <option value="1500">£1500+</option> </select> </strong></td> </tr> <tr> <td><strong>Maximum Rent Per Calender Month </strong></td> <td><select name="select3" > <option selected>No Maximum</option> <option value="400">£400pcm</option> <option value="500">£500pcm</option> <option value="600">£600pcm</option> <option value="700">£700pcm</option> <option value="800">£800pcm</option> <option value="900">£900pcm</option> <option value="1000">£1000pcm</option> <option value="1200">£1200pcm</option> <option value="1500">£Over 1500pcm</option> </select></td> </tr> </table> </fieldset> </div> <fieldset> </fieldset> <fieldset> </fieldset> <fieldset> <?php else: ?> <p> <?php echo $this->getHtmlList('types', '--'.JText::_( 'Property type' ).'--', 'type_id' ) ?> <?php echo $this->getHtmlList('departments', '--'.JText::_( 'Department' ).'--', 'department_id' ) ?> <?php echo $this->getHtmlList('towns', '--'.JText::_( 'Town' ).'--', 'town_id' ) ?> </p> <?php endif ?> </fieldset> <p><input type="submit" class="button" value="<?php echo JText::_('Search') ?>" /></p> <?php if ( $this->params->get('advanced_search', 0)): ?> <fieldset><legend><?php echo JText::_('Advanced search') ?></legend> <table> <tr> <td class="jea_label"><label for="budget_min"><?php echo JText::_('Budget min') ?> : </label></td> <td><input id="budget_min" type="text" name="budget_min" size="5" /> <?php echo $this->params->get('currency_symbol', '€') ?></td> <td class="jea_label"><label for="budget_max"><?php echo JText::_('Budget max') ?> : </label></td> <td><input id="budget_max" type="text" name="budget_max" size="5" /> <?php echo $this->params->get('currency_symbol', '€') ?></td> </tr> <tr> <td class="jea_label"><label for="living_space_min"><?php echo JText::_('Living space min') ?> : </label></td> <td><input id="living_space_min" type="text" name="living_space_min" size="5" /> <?php echo $this->params->get( 'surface_measure' ) ?></td> <td class="jea_label"><label for="living_space_max"><?php echo JText::_('Living space max') ?> : </label></td> <td><input id="living_space_max" type="text" name="living_space_max" size="5" /> <?php echo $this->params->get( 'surface_measure' ) ?></td> </tr> </table> <p><?php echo JText::_('Minimum number of rooms') ?> : <input type="text" name="rooms_min" size="1" /></p> <p><?php echo JText::_('Advantages') ?> : <br /> <?php echo $this->getAdvantages('', 'checkbox') ?> </p> </fieldset> <p><input type="submit" class="button" value="<?php echo JText::_('Search') ?>" /></p> <?php endif ?> <div> <input type="hidden" name="Itemid" value="<?php echo JRequest::getInt('Itemid', 0) ?>" /> <?php echo JHTML::_( 'form.token' ) ?> </div> </form>
  2. Ok I am confused!!! I changed the e-mail address vairable. Still getting the problem: Parse error: syntax error, unexpected T_STRING in /home/phulldes/public_html/masiv.php on line 61 With regards to putting the HTML into the PHP, I dont think I am doing it right since it removes all text. By the way, the new link is www.phulldesigns.com/masiv.php
  3. Hi, i'm new to this PHP thing, so I am a bit slow, but most of you guys know what your on about. Basicly, I am making a really simple script, I am not that great with PHP but using some tutorials and some previous scripts I attempted to make one. Now, as you can see, it doesn't work. [a href=\"http://www.phulldesigns.com/masiv.html\" target=\"_blank\"]PAGE WITH PHP PROBLEM LINK[/a] Basically, it doesn't send or display the page which confirms it has been sent!!! So its kind of useless! I was hoping someone could fix the script and maybe instead of telling someone it has been sent, just make it redirect back to the page they were on? The script has been attached below. [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Phull Designs | New Site Coming Soon</title> <style type="text/css"> <!-- .style1 {     font-family: Tahoma;     font-size: 11px; } .style2 {font-family: Tahoma; font-size: 11px; font-weight: bold; } .style3 {color: #666666} .style4 {color: #D58E3E} .style5 {font-family: Tahoma; font-size: 11px; color: #333333; } .style6 {font-family: Tahoma; font-size: 11px; font-weight: bold; color: #333333; } --> </style> </head> <body> <table width="800" border="0" align="center">   <tr>     <td width="800"><img src="images/header.png" alt="Phull Designs | Masiv Studio's" width="800" height="194" /></td>   </tr>   <tr>     <td align="left" valign="middle"><p class="style2"><span class="style4">Latest</span> | <span class="style3">News</span></p>       <p class="style6">1st June 2006</p>       <p class="style5">Over the past 6 months, Phull Designs has decided to diversify  into different parts of designing (other than web designing) and will now start  to include business card designing, leaflets/brochure, posters etc. More  details will be available in the near future. <br />         </p>       <p class="style5">From the 1st June 2006, Phull Designs will begin to work with  Masiv Studio's. Masiv Studio's is a well established multimedia designing  company which has a number of satisfied customers. To help diversify into the  wide market, Phull Designs will work with Masiv Studio's to help its clients  achieve the truly distinctive and efficient ethos they aim for.<br />       </p>       <p class="style5">More details will be available in the near future, however if  you are an interested client who needs more information about the existing new solutions  available please fill out the form below or follow the links.</p>       <p class="style5">Thank You,</p>       <p class="style6">// Phull Designs </p>       <table width="815" border="0">         <tr>           <td width="809" height="3"><img src="images/h-line.png" width="800" height="1" /></td>         </tr>       </table>       <p class="style6"><span class="style4">Further</span>| <span class="style3">Information</span> </p>       <form method="post" action="<?php echo $PHP_SELF?>">         <table width="800" border="0">             <tr>               <td width="27" height="40" valign="middle"><div align="right" class="style5">Name</div></td>               <td width="179" valign="middle"><input name="Name" type="text" class="style5" id="Name" value="Your Name" size="25" maxlength="30" /></td>               <td width="102" valign="middle"><div align="right" class="style5">E-Mail Address              </div></td>               <td width="170" valign="middle"><input name="EMail Address" type="text" class="style5" id="EMail Address" value="Your E-Mail Address" size="25" maxlength="30" /></td>               <td width="105"><div align="right" class="style5">Telephone Number </div></td>               <td width="191"><input name="Telephone" type="text" class="style5" id="Telephone" value="Your Telephone Number" size="25" maxlength="30" /></td>             </tr>           </table>         <p>         <input name="submit" type="submit" value="Submit" />         <?php if ($submit) {   $tomail = "sales@phulldesigns.com";   $replyemail = "sales@phulldesigns.com";   $Name = $_POST['Name'];   $EMail Address = $_POST['EMail Address'];   $Telephone = $_POST['Telephone'];   mail($tomail, "Masiv Studio's Form Queried", "An interested client with the ID:($REMOTE_ADDR,REMOTE_HOST,HTTP_USER_AGENT) has entered the following information with regards to an interest with Phull Designs and Masiv Studios.<br><br><b>Name:</b>$Name<br><b>E-Mail Address</b> $Email Address<br><br><b>Telephone:</b> $Telephone<br><b>, "Content-Type: text/html; charset=\"ISO-8859-1\"\nFrom:$replyemail\n");   echo "The data entered has been sent to the Sales Team @ Phull Designs. Please allow up to 48 hours for a reply.."; } else { ?></p>         <p class="style5"><strong>Please Note:</strong> For security reasons, your IP will be sent. Please see our <a href="privacy.html">privacy policy</a> for more details. </p>         <table width="71" border="0" align="right">           <tr>          </tr>         </table>       </form>              <table width="815" border="0">         <tr>           <td width="800" height="3"><img src="images/h-line.png" width="800" height="1" /></td>         </tr>       </table>       <p class="style2"><span class="style4">Web</span> | <span class="style3">Links</span> </p>       <p class="style1"><a href="http://www.masivstudios.com">Masiv Studio's</a></p>     <p class="style1"><a href="http://www.phulldesigns.com">Phull Designs </a></p>     <p class="style1"> </p></td>   </tr>   <tr>     <td bgcolor="#CCCCCC"><div align="center"><span class="style1">| - © Copyright 2006 Phull Designs. All Rights Reserved. - | </span></div></td>   </tr> </table> </body> </html> [/code] THANK YOU!!!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.