Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. nono, he's a real American hero.
  2. But...G.I. JOE told me that knowing is half the battle...
  3. well..I mean, this isn't primarily a music discussion board..what'd you expect?
  4. okay well then why not go back to the session var idea, except after submission and deletion, you unset the session var?
  5. hmm well in my own experience, most hosts still use php4 by default, but have php5 installed, as well, and you can use php5 code by using a specific mime type dedicated to it, like *.php5 (or assign your own). I really don't think php4 is gonna disappear from standard hosting packages until sometime after a php6 final is released. You got to understand, in the business world, the prevailing motto for coding is "If it ain't broke, don't fix it." The guys in suits don't give 2 sh!ts what's going on under the hood. If it's still working on the outside, they see no reason to change what's on the inside. It's only when stuff starts actually breaking (like register globals being turned off) that anybody actually does anything.
  6. Maybe it has to do with the fact that he's not using php5. That's my guess, anyways.
  7. My first guess is that your blank screen is due to you not having any output. My 2nd guess is that $yes isn't defined, at least, not in the code you've provided, so it'll always be false.
  8. maybe I'm not understanding right, but how about instead of making a disabled field, you just echo out the value and make a hidden field?
  9. isn't it just the [default] font style those programs use, that makes for different spacing? Anyways, there's no way to change the spacing unless you wanna use css but you said you want to send plain text so...yeah..
  10. instead of name='blah' do name='blah[]' in your form elements, then loop through it like so: foreach ($_POST['blah'] as $blah) { // sanitize // query }
  11. Well you obviously have no problem lying to your girlfriend, so I suggest giving her some kind of "my dog ate them" or "I left them in my pocket and they got washed" excuse.
  12. use htmlentities()
  13. Unless he's trying to utilize session vars in db_connect(); that doesn't really matter. All that really matters is that you have it before any output and before trying to utilize session vars. You're going to have to be more specific than that. Trying to navigate to another page and there's no session? Could mean that you don't have session_start(); at the new page. session_start(); must be on any page you wish to have access. If you do have that squared away, do you have cookies enabled? If you do not have cookies enabled, the server has no idea what your session id is, so it can't access your session data. If you have that squared away, be more specific about your problem. Any error messages? At what point does it "stop working," and what does that mean? Blank values? Again, be more specific about your problem.
  14. Earlier I told you that I didn't know if there was a way to tell if it was a mapped network drive or not, but I just read one of the notes for the link I gave earlier: So yes, that is working as intended.
  15. are the permissions on the file set right?
  16. Now that's a bit unethical isn't it? Who's to say it isn't a public hotspot like starbucks or a hospital? how to connect two computers without a hub
  17. Pretty much every cell phone in existence has an email address. The email address is the 10 digit phone number (area code + phone number) and a specific domain name depending on the carrier. For example, a tmobile cell phone email address would be [email protected] (random number). I haven't really tried to track down an exhaustive listing of carrier email domain names, but if you google "sms email addresses" you can quickly find a listing of the major carriers. When the carrier's server receives it, they convert it into an SMS message. You would utilize the mail() function just like sending any other email, to send a message to that email address. I'm not sure what the technical details to what's acceptable and what's not, like what kind of headers are allowed, max message length, etc.. (and I'm sure even then it varies from carrier to carrier), but in my experience with messing around sending stuff to cell phones with different carriers, this format seems to be pretty safe: $to= "[email protected]"; $from = "[email protected]"; $subject = "very short text here"; $message = "No more than about 80 chars here"; mail ($to, $subject, $message, $headers); One thing I want to point out though is that when a cell phone receives a text from another cell phone, the receiver usually has an option to reply to the message. But I have tried send SMS messages like this to 3 different cell phones with 3 different carriers and the "reply to" link on the phone is always some number code. I'm guessing it's some kind of message# type number or id number or something, I really haven't looked that far into it. The return address in the $from does get listed, so I was able to manually send a text message to it, though (creating a new text message). It is possible to send text messages to those "pay as you go" type phones you can buy at the store. The trick is to figure out which carrier provides for them. Most of those pay-as-you-go companies actually use several carriers, depending on the area/place the phone was bought at. One way you can find out is by looking it up. places like fonefinder.com can tell you the carrier if you put in the number. I haven't really looked into how they do that, so I can't help you there, except to tell you a quick and dirty alternative: someone enters in the cell phone number, you email the message to every carrier on your list. Since cell phone numbers are unique, it will just fail on all of them except the one that works (providing their carrier is on your list). You'll have to sort out the ethics of that yourself, lol. Another thing to note is that all applicable text message fees apply to the receiver. So if they get charged like 10 cents per text message, they will get charged for that.
  18. http://www.youtube.com/watch?v=ozjq80IF9dg&feature=related
  19. Oh. Just seemed that when everybody was talking about login integration, that if I logged into one, it would automatically log me into the other. I mean, it makes sense to me to do that...did you have some reason why it's not like that, or is that on some to-do list?
  20. Someone in the manual gave an example of how to list all drives, free space, total space and percentage free. I suppose you can find out whether it's a cdrom drive or not by virtue of the numbers the code produces, but AFAIK there's no way to figure out whether it may be a mapped network drive or not.
  21. Nope, still doesn't work. I logged out of everything, cleared all my cookies. If I log in from main site and then go to forums, I am not logged in on forums. Logged out of everything, cleared all my cookies. If I log in from forum and then go to main site, I am not logged in at main site.
  22. well I don't know what the bigger picture here is, but based off just that code, suppose you could do: if((substr($page,5,1) >= 1) && (substr($page,5,1) <= 6)) { $current3="current"; } edited to fix 2nd substr argument (forgot it started at 0)
  23. I think if I were to go the text file route I'd consider making a file that runs the query and writes the results into a separate text file. Put that script on a cron job to run every 5 minutes. Then simply include the text file in your pages.
  24. Quick and dirty example: form.php <?php session_start(); // echo out errors. Nothing will echo out if first time visit foreach($_SESSION['errors'] as $error) { echo "$error <br />"; } // end foreach error unset($_SESSION['errors']; // echo out form. Default values previous entered in stuff if applicable echo <<<FORMENT <form action = 'process.php' method = 'post'> First Name:<input type = 'text' name = 'fname' value = '{$_SESSION['fname']}'> <br /> Last Name:<input type = 'text' name = 'lname' value = '{$_SESSION['lname']}'> <br /> <input type = 'submit' value = 'submit'> </form> FORMENT; ?> process.php <?php session_start(); // check to see if fname was filled out. If not... if(!$_POST['fname'] || (trim($_POST['fname']) == '')) { // make an error msg session array $_SESSION['errors'][] = "Need to fill out first name."; // if filled out... } else { // create a session var for fname // also might want to sanitize... $_SESSION['fname'] = $_POST['fname']; } // end if..else fname // check to see if lname was filled out. If not... if(!$_POST['lname'] || (trim($_POST['lname']) == '')) { // make an error msg session array $_SESSION['errors'][] = "Need to fill out last name."; // if filled out... } else { // create a session var for lname // also might want to sanitize... $_SESSION['lname'] = $_POST['lname']; } // end if..else lname // if there are errors... if($_SESSION['errors']) { // send user back to form header("Location: form.php"); // if no errors generated... } else { // insert into db code here. } // end if..else errors ?>
  25. http://www.php.net/time http://www.php.net/mktime etc..
×
×
  • 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.