Jump to content

FUNKAM35

Members
  • Posts

    87
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

FUNKAM35's Achievements

Member

Member (2/5)

0

Reputation

  1. $first1 = $_POST['first1']; $last1 = $_POST['last1']; $email1 = $_POST['email1']; $register = $_POST['register']; ok I think the error is on some different lines as posted here how can I fix this please thanks
  2. <form name=\"form1\" ACTION=\"$_SERVER[REQUEST_URI]\" METHOD=\"POST\">Your First Name<br><input name=\"first\" value = \"$first\" type=\"text\" id=\"first\" size=\"25\"><br><br>Last Name<br><input name=\"last\" value = \"$last\" type=\"text\" id=\"last\" size=\"25\"><br><br>Email<br><input name=\"email\" value = \"$email\" type=\"text\" id=\"email\" size=\"25\"><br><br>Telephone Number<br><input name=\"phone\" value = \"$phone\" type=\"text\" id=\"phone\" size=\"25\"><br><br><label for=\"comments\">Comments</label><textarea name=\"comments\" cols=\"18\" rows=\"4\" class=\"txt\" id=\"comments\"></textarea><div style=\"visibility:hidden\"><input name=\"email2\" type=\"text\" size=\"45\" id=\"email2\" > </div><input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"tpc4\"></form>\n"; Hi I am getting the error message Notice: Undefined Index on the following form before submission I would like to fix this rather than suppress errors Any help would be much appreciated
  3. $total_results = mysqli_result(mysqli_query("SELECT COUNT(*) as Num FROM property WHERE $where "),0) ; $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM property WHERE $where "),0) ; Hi, Please can anyone help I have changed MySQL_ to mysqli_ but I am getting fatal error on above line, please can anyone help Thanks
  4. Thanks Ch0cu3r tried that and it says Fatal error: Call to a member function query() on a non-object
  5. $results = mysql_query("$select", $link_id); while ($query_data = mysql_fetch_row($results)) { $link_id = mysqli_connect("$db_host","$db_user","$db_password","$db_database"); if ($mysqli->connect_errno) { echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error; } $link_id = mysql_connect("$db_host","$db_user","$db_password"); if (mysql_select_db("$db_database", $link_id)); else { echo "connection failed."; } I am having to update MySQL to mysqli as my host is upgrading to PHP5.6 I have managed to convert and connect to the database converted to I cannot get the fetch results to work, can anyone help me convert the following code Many Thanks
  6. Hi, I need to do a multiple select eg select * FROM stock WHERE and then it will be where (width=100 AND size=50 AND profile=20) OR (width=50 AND size=120 AND profile =30) OR (width=30 AND size=40 AND profile=70) How would I do this? many thanks
  7. hi, thank you for your reply. the $places are a set list of places in the variables file. don't know why I did the globals, think because it was set list.
  8. <?php global $places; $comm = $GLOBALS["location"]; $comm=trim($comm); while(list($one,$two) = each($places)) { echo "<option value=\"$two\""; if ( $two == $comm)echo "selected "; echo ">$two</option>\n" ; } ?> Variable passed to each() is not an array or object Hi, my code works fine but it is giving the error message Please can anyone help? Thanks
  9. Hi I need to select a distinct variable $area from the table property I also need to select the variable $location from the same table so it gives the array $area/$location Select distinct area from property Select location from property where $area =`area` How can I string the two together Many Thanks
  10. woohoo it works many thanks, learn something new every day on here!!
  11. It worked fantastic many thanks adam!
  12. <?php if(empty($_GET['order_by']))$order="order by price ASC "; if($_GET['order_by']=='priceasc')$order="order by price ASC "; if($_GET['order_by']=='pricedesc')$order="order by price DESC "; if($_GET['order_by']=='newest')$order="order by prop_id DESC "; if($_GET['order_by']=='updated')$order="order by updated DESC "; if($_GET['order_by']=='bedsasc')$order="order by beds ASC "; if($_GET['order_by']=='bedsdesc')$order="order by beds DESC "; ?> this is at the top of the page
  13. $select = "SELECT prop_id, ref, complex, price, beds, location, type, disc, sold, updated FROM sales ".$order; echo "<table width=\"80%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"left\"><tr><td class=\"norm\" align=\"left\"><div class=\"styled-select\"><form id=\"formorder\" action=\"$_SERVER[REQUEST_URI]\" method=\"get\"><select name=\"order_by\"onChange=\"UpdateQty(this)\" ><option value=\"sort by\" selected=\"selected\">Sort by</option><option value=\"priceasc\">Lowest Price First</option><option value=\"pricedesc\">Highest Price First</option><option value=\"newest\">Recently Added</option><option value=\"updated\">Recently Updated</option><option value=\"bedsasc\">Beds (Low to High)</option><option value=\"bedsdesc\">Beds (High to Low)</option></select><input type=\"submit\" name=\"submit\" id=\"button\" value=\"go\"></form></div></td> <td class=\"norm\" align=\"left\">\n"; if($order_by=="priceasc"){ echo"Sorted by Lowest Price First"; } if($order_by=="pricedesc"){ echo"Sorted by Highest Price First"; } if($order_by=="newest"){ echo"Sorted by Recently Added Properties First"; } if($order_by=="updated"){ echo"Sorted by Recently Updated Properties First"; } if($order_by=="bedsdesc"){ echo"Sorted by Recently Added Properties First"; } if($order_by=="bedsasc"){ echo"Sorted by Recently Updated Properties First"; } echo"</tr></td></table>\n"; the following script does not display the sorted by part It works in that it changes the order but the echo Sorted by does not display instead it displays nothing, please help spent hours trying to figure it out. thanks
  14. Hi, I see dont know why but thought the defined $places as variables was known as $globals Many thanks will try your code
  15. $places = array("Birmingham","Cornwall","Leeds","London","Manchester"); hi, I have a list of $global in the variables file how do I get these to display in a list I have only done select before when theya re ina table not in a set globals like these Thanks
×
×
  • 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.