Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. did you even try my last post ?
  2. try this preg_match('/' . preg_quote($variant, '/') . '(?:\s|\?|,|!|\'|"|\.)?/', $shebang
  3. mysql_fetch_array does both associative and indexd so 30 is correct try this $edit_question = mysql_query("SELECT * FROM intro WHERE id = {$_GET['ID']}"); while($question = mysql_fetch_assoc($edit_question)) { foreach($question as $K => $V) { $field_name = mysql_field_name($edit_question, $i); echo "<tr><td>$K</td><td>$V</td><td><input type=\"textarea\" /></td></tr>"; } }
  4. wrong section, try the regex section also if you need help with something we need to see what you have so far! also what punctuation marks ? heres an example (\w) hyphenated words example (\w+(?:-)?(?:\w+)?(?:\.|\?|\w|\')+)
  5. after re-reading your first post.. the code has nothing to do with dlist.php so i don't see how the problem could be their!
  6. sizeof AKA count returns the number of items, in an array, the array starts from 0, so you need to remove one from the count, see below <?php $edit_question = mysql_query("SELECT * FROM intro WHERE id = {$_GET['ID']}"); while($question = mysql_fetch_array($edit_question)) { for($i = 0; $i < (sizeof($question)-1); $i++) { $field_name = mysql_field_name($edit_question, $i); echo "<tr><td>$field_name</td><td>$data</td><td><input type=\"textarea\" /></td></tr>"; } } ?>
  7. try this <?php $i=1; while($row = mysql_fetch_array($choiceresult)) { $i++ echo '<tr> <td>'.$i.'</td> <td>'.$row[1].'</td> <td>'.$row[2].'</td> <td>'.$row[4].'</td>'; if ($row[3] == 0) { echo '<td> &nbsp </td> <td>No</td>'; } else { echo '<td>'.$row[5].'</td> <td>Yes</td>'; } echo '<form action="dedit.php" method="post"><input type="hidden" name="editid" value="'.$row[0].'" /> <td><input type="submit" value="Edit" /></td> </form> </tr>'; } ?>
  8. $row2['ProductType'] = "Shirt" should be $row2['ProductType'] == "Shirt" on all 3 whiles
  9. do you have some sample data of the database.txt file, as i am not sure what i am working with here.. your using double base64_decode but no encodeing with would mean it would only allow you to exit it once!
  10. foreach($decoded as $dec) won't work it needs to be an array not a string i don't understand the problem here, can you explain that a little clear please
  11. yeah, i know (after you posted, Not quite. post) but you can tweak the fetch to fit the build.. if you get what i mean
  12. try this $query = "SELECT id FROM events WHERE MONTH(date) = $m ORDER BY date";
  13. have you used curl to login ? if not you can't change the password
  14. Solved? can you click solved please, saves other read this thread wanting to help
  15. change echo "<option value=$it->target>$it->target</option>"; to echo "<option value='$it->target'>$it->target</option>"; Note the quotes EDIT: without the quotes its values is the test until with a > or a space is hit, with the quotes it takes the value until the closing quote is hit
  16. true, but mysql_fetch_array can fetch both associative and indexed (by default) using $row = mysql_fetch_array($result, MYSQL_BOTH); EDIT: No no Barand your very correct , (now i think about it) i get your point
  17. well if thats not what your asking then just say so.. your question is confusing, (it hardly seams like you even asking one) never mine happy coding
  18. well 4.4.8 was the last version 4 so it maybe worth upgrading infact php4 has been discontinued for over 5 mouths.. if this is a major project wouldn't it be better to use version 5, as 6 is coming out soon. if you use wildteen88 code as a basis for all the interaction with the files you should be able to find the exact problem.
  19. before i read all that.. what were the results of wildteen88 test?
  20. for some reason the IN doesn't like a varchar so i changed it to suite <html> <head> <title> Inventory </title> </head> <body> <div align=center> <br><br><br> <?php $sql = mysql_query("SELECT * FROM Account WHERE AccountID = '{$_SESSION['id']}'"); $row = mysql_fetch_array($sql); $APL = $row['AccountProductList']; $AccountID=$row['AccountID']; $AccountName=$row['AccountName']; ?> <b>Account ID</b>: <?php echo($AccountID); ?> | <b>Account Name</b>: <?php echo($AccountName); ?> <br><br> <?php $getaccountlist = mysql_query("SELECT * FROM Products WHERE ProductID IN ($APL) ORDER BY ProductType"); echo " <table> <tr> <td align=center colspan=4> <b>Shirts</b> </td> </tr> <tr> <td> Product ID </td> <td> Product Name </td> <td> Product Type </td> <td> Product Price </td> </tr>"; $type = ""; while($row = mysql_fetch_array($getaccountlist)) { $UserProductID = $row['ProductID']; $UserProductName = $row['ProductName']; $UserProductType = $row['ProductType']; $UserProductPrice = $row['ProductPrice']; //this If create headers for each type if($type != $UserProductType) { echo "<tr><td colspan=\"4\">$UserProductType</td></tr>"; $type = $UserProductType; } echo " <tr> <td> ".$UserProductID." </td> <td> ".$UserProductName." </td> <td> ".$UserProductType." </td> <td> ".$UserProductPrice." </td> </tr>"; } echo "</table>"; ?> </div> </body> </html>
  21. LMAO.. i don't believe i missed that, okay lets see if theirs a non-dumb bug $getaccountlist = mysql_query("SELECT Products.* FROM Products, Account WHERE Products.ProductID IN (Account.AccountProductList) ORDER BY ProductType") or die(mysql_error());
  22. strange your not getting any errors try this $getaccountlist = mysql_query("SELECT *.Products FROM Products, Account WHERE Products.ProductID IN (Account.AccountProductList) ORDER BY ProductType") or die(mysql_error()); see if we can get an error to help
  23. do you mean <?php $username = $row['username']; $password = $row['password']; $etc = $row['etc']; //or extract($row); //or foreach($row as $k => $v) { $$k = $v; } //or list($username, $password, $ect) = $row; ?> all do the same
  24. yes but unneeded the update will break them up, well kinda.. your see what i mean, in thelast update i forgot to update the SQL so change $getaccountlist = mysql_query("SELECT *.Products FROM Products, Account WHERE ID IN (Account.AccountProductList) ORDER BY ProductType"); to $getaccountlist = mysql_query("SELECT *.Products FROM Products, Account WHERE Products.ProductID IN (Account.AccountProductList) ORDER BY ProductType");
×
×
  • 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.