Jump to content

MatthewJ

Members
  • Posts

    803
  • Joined

  • Last visited

    Never

Everything posted by MatthewJ

  1. You should back up some posts to where a few different people told you what the actual problem was. You didn't even acknowledge the two posts that would probably have you working?
  2. Not making much sense, but as a rough guess.. I am sassuming you are looking for something like this. SELECT table1.carType, table1.carYear, table2.color FROM table1 JOIN table2 ON table1.colorID = table2.colorID That would select the car type and car year from table one... and then will join the car color from table two based on the matching number.
  3. I mean no offense, but if you look... he has opening and closing php tags within a string where he is trying to do the include... strangely enough, PHP tags don't work when they're within a string
  4. $header = "<table width='100%' border='0' height='80' cellpadding='4' bgcolor='#000000' > <tr> <td width='39%' height='76' valign='top'><p><span class='stigrosheadfont'><strong>www.StigRos.com</strong></span><strong><span class='headnocrap'><br /> ( No Crap - Just Quality Movie & Music Downloads )</span></span><br /> <a href='http://mysite' class='headerlinkcolor'>Home</a> | <a href='register.php' class='headerlinkcolor'>Register</a> | <a href='#' class='headerlinkcolor'>Contact us</a></strong></td> <td width='47%' valign='bottom'><p class='normalblacktext'>You are currently logged in, <b>" . $_SESSION['username'] . "</b></td> <td width='14%' valign='top'><div align='center'> <div align='center'><span class='headfont'><strong>Disclaimer</strong></span></div> <div align='center'>" . include_once('countertest.php') . " " . date('F d, Y') . "</div></td> </tr> </table>"; Try replacing the $header chunk with this.
  5. date('w', mktime(0,0,0,$month,$day,$year));
  6. This is a help forum... people tend to "help" when you've posted code with problems. If I remember, there is a freelance section where you can post something you would like to pay for? It's pretty hard to find someone that just feels like working for you for free
  7. It appears you're missing a bunch of the query... $sql = "UPDATE payments SET $amtpaid, $prevbal, $hudpay, $tentpay, $datepaid, $late, $comments, $paidsum"; Should be something like $sql = "UPDATE payments SET `amtpaid` = $smtpaid.." And so on... you actually have to tell it what field you want to update with what new data. Also, string items need to quoted when passed through a query.
  8. No, you only need to set a session variable once for the life of the session. FOr the last question, I'm guessing you just have it backward, should be $email = $_SESSION['email'];. Either way, you don't even really need to do that, just use it as $_SESSION['email'].
  9. Ken's statements just mean "If the variable is set, set the value of what is in front of the equals to that value, if not set it to blank". That way, your variables in front of the equals always have a value. Hence they are no longer "Undefined"
  10. Even more than that... based on network speeds at the time, the time to complete could vary greatly. The site does not provide any other way to get the product data? You think maybe they don't want people to scrape their pages? Just a thought.
  11. Are you thinking something like SELECT categories.*, products.* FROM categories JOIN products ON categories.id = products.id WHERE products.numberinstockfield > 0 I'm sure there are ways to improve that, I just wanted to give you the idea.
  12. I also think you would want to quote the attribute echo "<option value='".$nt['Sub_ID']."'>$nt['Sub_Name']</option>";
  13. Why not just show the progress bar while the file is created, then display a link to a page that will just force the download? It's an extra click, most are not afraid to click an extra time though
  14. As a side note... I would use the same solution as proposed by mjdamato I just didn't feel like typing much this morning so I threw the obvious at the OP. That's why I love this site, there is always someone to help clarify the answer of others can't make it back soon enough.
  15. while ($rowvalues=mssql_fetch_array($getnames)){ $name = $rowvalues['forename']; if($valuetocheck == $name) { $options.="<option value=\"$name\" selected=\"selected\">".$name."</option>"; } else { $options.="<option value=\"$name\">.$name."</option>"; } } Something like that... PS... you were missing a double quote, that is the reason for the edit.
  16. You just wrote the logic in your head... so you get the data, then you write the select statement code... Then, within each option add if($datafield == "whicheveroption") { echo "selected='selected'"; }
  17. Try adding a from header and see if that helps.
  18. http://help.godaddy.com/article/1
  19. Like PFMaBiSmAd said... in the source it is correct, also the leading double quote seems useless
  20. I'd start with a tutorial on regex... it is not that hard to get your hand around when you sit down and power through it. Just don't try and remember every character etc.. look them up and focus on what the regex functions themselves are doing. It is usually pretty easy to find a pattern that is close and manipulate it to what you need.
  21. There are no attributes in the string you posted... In this example name would be the attribute, with a value of test <tag name="test">Tag 1</tag> so you shouldn't be trying to get attributes.
  22. Why would you need to escape the data coming from your own database to begin with? I am assuming I guess that the username is put into the session from the original login process after being pulled from your database. If that is the case escaping shouldn't be an issue.
×
×
  • 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.