Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. What do you see if you do print_r($_POST) on the top of the php page? Also, you might need to use isset() since if they leave the field blank I think it will cause this error. so it would be if(isset($_POST['firstName'])){ //your cleaning code }else{ //it was left blank }
  2. you can use function_exists for the file_get_contents, I guess you could do the same on curl_exec or something.
  3. I think the data there instead of the 0, means that the value of $recordset is an array. If it said 0 instead of array, I would think recordset is an array. *shrug* weird.
  4. I actually wrote the code to do this the other day. Have this as your iframe's src page: iirc, you'll need to make a cookie.txt file that has 777 permission <?php ini_set('display_errors', 1); error_reporting(E_ALL); $url = 'the login pages url '; $cookieFile = 'cookie.txt'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POSTFIELDS, 'the post fields go here, ie username and password'); $result = curl_exec ($ch); curl_close ($ch); $url = 'the page you want to load once you are logged in.'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $result = curl_exec ($ch); curl_close ($ch); print $result; ?>
  5. It means there is no 'firstName' being posted. What is your form's HTML
  6. So on the top of your processing page, do print_r($_POST); and click on one of the buttons. See what it says. Then go back and click on the other, and see what it says now. Also, make sure they have values as well. value="action1" and value="action2"
  7. I've never seen it before, but I think that's what they have, a multidimensional array.
  8. $JobID = $recordset[0]['JobID'];
  9. It depends on how you're selecting which action? Do you have two submit buttons? A drop down? What?
  10. you probably have getURL('url', '_blank', 'POST') in there somewhere or something like that. I think if you change '_blank' to just '' it does it in the background. Not sure if that's right but give it a shot.
  11. The code you're talking about is in flash. You need to have flash call the PHP file in the background instead of going to it. Check out kirupa it is a good site for flash.
  12. How is it going to do the notify? Will they have a computer with the browser open? You could just make that page constantly refresh. If they're expecting email, just have it email when the new order is placed.
  13. What is in include ("include.php"); and use code tags! The # symbol on the editor!
  14. Jessica

    URL

    What if you have a user who signs up as "messages". How do you tell which messages page you want, their profile or the messages page? Make the users have a distinct type of url, it will be easier.
  15. You don't even need that get stuff, just update the counter each time. You could also use a txt file instead.
  16. I would use a database and in the comments table, you have a parentID or something, that shows which comment it was a reply to. Then you use a recursive function like this: http://www.phpfreaks.com/forums/index.php/topic,159658.msg696481.html#msg696481 To sort them out.
  17. sessions do not last between subdomains, so it is the www. You can either use a BASE_URL constant with a URL or a relative path, so they never leave the subdomain.
  18. Jessica

    URL

    You probably want to do http://site.com/users/username/ so that you won't loose all your other pages.
  19. So it's just a way to set a boolean? I mean, I know JS doesn't have strong typing but what is the point in a statement that allows you to set a variable to false or a value?
  20. If it's the same for every user just define it in a config file that you include on all pages.
  21. It has everything to do with OOP, because I wanted to know if it was possible to use $this->value in the arguments of a method in that class. Wouldn't it make sense to be able to use it there? You're in the class at that point. Also, the ternary operator ought to be outlawed. Yes, it's shorter, but it gives no meaning to the code. if else is clear. ?: is not. And it's still pretty much the same as what I was doing, only using '' instead of NULL. I just wanted to know if there was a way to access the $this->value in the arguments, but unfortunately there is not.
×
×
  • 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.