Jump to content

harristweed

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by harristweed

  1. Make sure you are posting the data to paypal and not sandbox
  2. $sql= "SELECT name FROM unittype WHERE type = 1"; $result=mysql_query($sql) or die("Could not find units"); while($data=mysql_fetch_array($result)){ echo"$data[0]<br />\n"; }
  3. It appears that you have a field called 'name'. This is a reserved word in mysql. Change this field name and the query will work.
  4. this is how I would create a changeable variable <?php for($i=0;$i<=10;$i++){ $GLOBALS['html'.$i]=$i; } echo "two=$html2<br />\n"; echo "three=$html3<br />"; ?>
  5. <select id="country" name="country" tabindex = "511"> <option value="">(please select a country)</option> <option value="AF" <?php if($_SESSION['country'] =="AF")echo " selected = \"selected\" ";?>>Afghanistan</option> <option value="AL" ?php if($_SESSION['country'] =="AL")echo " selected = \"selected\" ";?>>Albania</option> .... Etc
  6. What does the date look like that is produces by datepicker?
  7. You might get a clue from this: http://www.phpfreaks.com/tutorial/working-with-checkboxes-and-a-database
  8. echo $newsentry; echo '_______<br />Read More..'; ?
  9. Put the image path into an array. Count the array. i.e. $images=array(); if((!empty($database_field_1))$images[]=$database_field_1; if((!empty($database_field_2))$images[]=$database_field_2; ...... $number_images=count($images);
  10. Quite simple, using CSS there is a container Div and each 'box' is a seperate Div (container) that is 'floated' having a fixed width, height and margin.
  11. have a look at http://www.starvillasjavea.com/3_bed_villas.php I think this is the same (ok its villas not movies but the principle is the same) If you want i'll send you the code.
  12. $qry = "INSERT INTO members(firstname, lastname, login,) VALUES('$fname','$lname','$login')"; remove comma after login $qry = "INSERT INTO members(firstname, lastname, login) VALUES('$fname','$lname','$login')";
  13. Self Defence Lesson: Attack with a white stick, OK, I can now defend myself against a white stick.... but what if it's a brown stick?
  14. This is NOT a PHP question. It is a Java script issue, you neen to look at jquery and http://www.jqueryplugins.com/plugin/193/
  15. http://www.phpfreaks.com/tutorial/basic-pagination
  16. You are only retrieving data from one table: $query = "SELECT * FROM Transactions, Transactions, Users WHERE Transactions.userID = '6' AND transDate = '2010-12-09'"; If you have three connected tables you need to 'join' them correctly. http://www.tizag.com/mysqlTutorial/mysqljoins.php
  17. I would have three tables: 1. User Details 2. Headings (rent, maintenance, wages, shopping etc) two columns heading_id and heading_description 3. Transactions. Four columns: trans_id, Trans_date, heading_id, amount
  18. as last resort, rtfm http://cn.php.net/manual/en/control-structures.elseif.php
  19. Yes, I can see a few error.. why not: $query = "SELECT * FROM Companies WHERE owner = '$userName'"; $result = mysql_query($query) or die("Error: " . mysql_error()); $count = mysql_num_rows($result); echo"<p>Count: $count</p>"; $i=1; while($data=mysql_fetch_array($result)){ echo $i.":".$data['name']."<br />\n"; $i++; }
  20. errors in your code: Line 137 h1, { should be h1{ Line 170 should not have a '}' Line 140 need a closing ; "; You need three closing } after line 140
  21. while($row=mysql_fetch_array($result)) { echo "<option value=$row[school_year]"; if($your_value==$row[school_year])echo " selected = \"selected\" "; echo">$row[school_year]</option>"; }
  22. are you sure there is a database connection?
  23. not certain but try: if(empty($row[experience])){ $row[experience]=" "; }else{ $row[experience]=str_replace("\r","",$row[experience); }
×
×
  • 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.