Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. Where do you define this variable? $row_get_.$pag If it is outside of the function, you probably have a scope issue. Show more code that shows where that variable is defined, and it will be easier to help you.
  2. When you give out a link, you can store it in the database along with the date you gave it out. Then setup a cron that will delete all the links in the database that are 24+ hours old each day. When a user goes to a link, check if that link exists in the DB, and if it doesn't, it gives them an error.
  3. I think the only way you can go, is to check if you have that information in the database already, and if you do, give them an error. So once they add the item to the cart and press refresh, instead of adding the item again, it will give them an error saying that the item has already been added.
  4. Honestly, I've never really understood the point of a MySQL class...isn't it easy enough already to do what you want with it?
  5. You never closed the brackets to your class. <?php class calendar{ var $year; var $month; var $endDay; function calendar($y,$m) { $this->year = $y; $this->month = $m; $this->startDate=mktime(12,0,0,$this->month,1,$this->year); $this->andDay = date('t',$this->startDate); $this->allTime = getdate($this->startDate); } function displayCells() { for ($count=0; $count < (6*7); $count++) { if (($count%7)==0) { if ($this->allTime['mon'] != $this->month) { break; } else { echo '<tr></tr>'; } } } } } $cal = new calendar(2007,10); echo '<table border="2"><tr>'; $cal->displayCells(); echo '</tr></table>'; ?>
  6. You can keep adding to the query like this: <?php $query = "SELECT * FROM tablem WHERE 1=1"; if(conditon){ $query .= " AND blah='$blah'" } if(conditon){ $query .= " AND whatever='$whatever'" } ?> Is that what your trying to do?
  7. Here is a very useful class you can use when you are allowing users to freely input a large amount of text that allows HTML and Javascript. http://htmlpurifier.org/ Always make sure to use mysql_real_escape_string() on ALL variables being used in a query. If you search Google on PHP security topics, you will find plenty of articles.
  8. Do you have a file that is included at the top of every script you write? That is called the header file. If you don't have one, then your going to have to put this at the top of all your scripts.
  9. PHP can't do this, so your going to have to stick with javascript. PHP only works server-side meaning it requires a page refresh.
  10. In your header file, put this line of code at the top header("Cache-control: private");
  11. You would get all that into one variable, like this <?php $var = "<TR CLASS=\"MYTABLE\">"; $var .= "<TD CLASS=\"MYTABLE\">" . $id . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">" . $date . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">" . $rooms . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $tax . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $misc . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $total1 . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\"> </TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $cash . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $bankcard . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $amex . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $directbill . "</TD>"; $var .= "<TD CLASS=\"MYTABLE\">$" . $total2 . "</TD>"; $var .= "</TR>"; ?> Now the $var variable contains the entire table.
  12. Check your phpinfo() to see if magic_quotes_gpc is on or off. If it is on, do this: ini_set('magic_quotes_gpc', 'off');
  13. Maybe your overwriting the past queries since you are using the same variable names. Try changing the $q and $r inside the loop to different letters.
  14. I'm thinking it's because this line is in the for loop: insert_location($thumb); That is the function that generates the success message. Maybe you could do something like this. First take out the success message from the function, then change the for loop chunk of code to this: <?php for ($i = 0; $i < count($_FILES['image']['tmp_name']); $i++) { $fileName = $_FILES['image']['name'][$i]; copy($_FILES['image']['tmp_name'][$i], IMAGE_FULL . $fileName); $thumb = new GallerySizer(); if ($thumb->getLocation($_FILES['image']['name'][$i])) { if ($thumb->loadImage()) { if ($thumb->getSize()) { if ($thumb->setThumbnail()) { if ($thumb->copyThumbImage()) { if ($thumb->resizeImage()) { $thumb->copyResizedImage(); } } } } } else { echo("Invalid image/file has been uploaded. Please upload a supported file-type (JPEG/PNG)"); unlink(IMAGE_FULL . $fileName); die(); } //insert image if (insert_location($thumb)) { $success = TRUE; } } } if (isset($success)){ $msg .= " Upload OK. The page will now Refresh!<br />"; displayPage($msg, "Upload OK!"); } ?> I'm not positive that will work, but you can give it it a try.
  15. onClick is a javascript thing. I'm not very good with javaScript, so I can't give you much help. This site should be helpful http://www.tizag.com/javascriptT/ It shows you how to work with dates, onlick, etc. So try finding your answer there. If you can't, then I would post this in the JavaScript forum.
  16. Try to use a lowercase 's' with the $subject variable. That is the way you have it in your form. mail($YourEmail, $subject, stripslashes($Message), $headers);
  17. You probably have that message in a loop. Take it out. We would have to see your code to help you more.
  18. [quote author=TheFilmGod link=topic=119164.msg675348#msg675348 date=1187573496] Seriously, you don't make good money as a php programmer. 60 grand tops. [/quote] Uhhh....I don't know about anyone else, but I would consider that to be very good money, I would be happy with it :)
  19. What kind of question is this?! I don't think your going to find anyone that doesn't get the least bit angry.
  20. Take a look at this http://www.search-this.com/2007/03/12/no-margin-for-error/
×
×
  • 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.