Jump to content

francoisp

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Contact Methods

  • MSN
    francoisap@hotmail.com
  • Website URL
    http://www.envirorack.com
  • ICQ
    195791396
  • Yahoo
    francoisenbelinda

Profile Information

  • Gender
    Not Telling
  • Location
    South Africa

francoisp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there I need help on 2 select boxes. If data is selected in SelectBox 1 then the data on SelectBox 2 must change accordingly ie Select City in SelectBox1 (from database) then the SelectBox2 (also from Database) must contain the values of the Suburbs relating to the City ? Is there a way to do this :?: Thx Francois
  2. The problem is that I want to populate a select box then the user selects value and submit this to db. The problem however is that the select box\'s value is not passed. The values do appear but the selected valus is not passed. Where am i making the mistake or where can I get the correct code to do this ? Thanks This file submits to file2(addtodb.php) <? include \'db.php\'; $results2= mysql_query("SELECT * from product Group by make asc"); $idmake = "makeid"; $iddescription = "description"; $idnamemake = "make"; echo mysql_error(); ?> <form method=POST action=addtodb.php> <? echo" <select name=\'make\'>"; //start the select box if (mysql_Numrows($results2)>0) //if there are records in the fields { $numrows=mysql_NumRows($results2); //count them $x=0; while ($x<$numrows){ //loop through the records $theId=mysql_result($results2,$x,$idmake); //place each record in the variable everytime we loop $theName=mysql_result($results2,$x,$idnamemake); echo "<option value=\'$idnamemake\'>$theName</option>n"; //and place it in the select $x++; } } echo "</select>"; //close the select ?> <p align=center><font face=Verdana size=1><input type=submit value=Submit name=B1><input type=reset value=Reset name=B2></font></p> </form>
  3. Consider the following code <?php include \'db.php\'; $result = mysql_query( "SELECT company_name FROM product_details" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); echo "These are the companies<P>"; echo "<table border=1 align=\'center\'\'>n"; while ($get_info = mysql_fetch_row($result)){ echo "<tr>n"; foreach ($get_info as $field) echo "t<td><font face=verdana size=3/>$field</font></td>n"; echo "</tr>n"; } echo "</table>n"; ?> Now i want the company names to appear with header rows as well as each company name must then be a url (popup) clicking on that the company details must be displayed ie Company Name, Address Tel no etc. How do I do this ? Any help will be appreciated :?: Any ideas Thanks Francois
  4. Hi there When i run the following code <? include \'db.php\'; $username = $_POST[\'username\']; $email = mysql_query("SELECT email_address from users where username=\'$username\'"); $subject = "My Subject"; $message = "My Message"; mail($email, $subject, $message, "From: OurDomaim<webmaster@domain.com>nX-Mailer: PHP/" . phpversion()); echo \'The E-Mail has been send !!\'; ?> I get the error Warning: mail() expects parameter 1 to be string, resource given in E:Program FilesApache GroupApache2htdocs..123.php on line 9 What am I doing wrong ? :?
×
×
  • 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.