Jump to content

shai1

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by shai1

  1. I found this tutorial on Apple's website and it's been very helpful. Thought I'd share it for other users... http://developer.apple.com/internet/opensource/php.html Thanks again for the help!
  2. I appreciate the help with this. I'll have to do some more research on updating my install. Thanks for the help.
  3. thorpe...I think you've nailed my problem. I looked at the link you supplied, but I'm not sure how I recompile the install with that option enabled. I'm working on OS X and was using the built in install of PHP. Do I need to download the binaries and reinstall it?
  4. I'm trying to do some date math and wanted to use the gregoriantojd function. In the PHP manual, it lists this function as being available for PHP4, PHP 5. I'm running PHP 5.2.5 and I get an error message when i call this function. Fatal error: Call to undefined function GregorianToJD(). Any thoughts on what I might be doing wrong?
  5. I forgot to mention that I had also increased the size of the post_max_size as well when I increased the upload_max_filesize. Both are showing the updates when I load phpinfo().
  6. Yeah, I did load the phpinfo() and it does appear in there with my new size, but the file still fails when i try and upload.
  7. Is there a true cap to the max size of a file upload? I have a file that is just a shade over 15M and I have changed the upload_max_filesize statement in my php.ini file from 15M to 20M, after a restart of my webserver, I still have problem getting the file to upload. There is no specific error message being returned, but the file never makes it to the upload directory. I'm wondering if 15M is the largest file php will ever support regardless of the setting being larger then that? I've uploaded many other files with no issue, the only thing I can figure is the 15M+ size of the file. Any insight to my issue would be wonderful! Thanks, Dave
  8. I want to use the MySQL LOAD INFILE statement to load in external data from an Excel file. The problem I'm having is that not all fields are ENCLOSED by quotes, but many are. Here is the code I'm using... [code]LOAD DATA LOCAL INFILE '/Path/to/File' INTO TABLE working_load FIELDS TERMINATED BY ','  ENCLOSED BY '\"' LINES TERMINATED BY '\r'[/code] What is the proper way to handle a file that will have some fields enclosed by a character, but not all? Or, is there a way I can get Excel to enclose all fields with quotes? Thanks in advance, Dave
  9. I found what I was looking for... [b]Load data infile[/b]. I thought I would post it for others to learn from. When searching I was looking for [b]insert from file[/b] and that is why I couldn't find any information on it. I have not tried it yet, but I've read that it is very fast. Thanks, Dave
  10. A while back I thought I read of a way to insert records from an external file without having to "loop" through them. I've been looking for how to do this and of course now I can't find it again. If anyone could show me an example of how to do this I would really appreciate it. Thanks, Dave
  11. I've contacted my hosting provider and they told me they can't help me because it is a scripting question and they don't support that. The good news is, when I send the same message to a hotmail account or other email accounts I don't see the "sent on behalf" of message. It seems to be something Outlook is doing. Any other thoughts or ideas would be apprecieated. Thanks, Dave
  12. I just purchased hosting from godaddy and am working on a site. When I sent email via mail() with my the header including [b]From: Me <me@mydomain.com>[/b] When I get the email sent via this page in outlook it gives me a long email address and then says [b]sent on behalf of me@mydomain.com[/b] Is there anyway I can make it just say [b]From me@mydomain.com[/b] instead of on behalf of and not show the other email address? Thanks, Dave
  13. This is EXACTLY what I was looking for. Thanks so much! I love internet forums! [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] [!--quoteo(post=389377:date=Jun 29 2006, 01:26 PM:name=jworisek)--][div class=\'quotetop\']QUOTE(jworisek @ Jun 29 2006, 01:26 PM) [snapback]389377[/snapback][/div][div class=\'quotemain\'][!--quotec--] try this... [code] SELECT * FROM table_name WHERE LENGTH(column_name)<=30; [/code] [/quote]
  14. Is there a way I can do a select that will return the records with a character count less then a specific number? i.e. select * from table where character count of textField<=30
  15. My problem now has more to do with the stripslashes function rather than addslashes. When I try and display the data back into the input field I get anything after the ' cut off because that is the character that encloses the data to be displayed. What do I do to solve this problem? Thanks, Dave
  16. [!--quoteo(post=221163:date=Apr 3 2005, 05:10 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Apr 3 2005, 05:10 PM) 221163[/snapback][/div][div class=\'quotemain\'][!--quotec--] Just a note: If you are trying to add them to a text field, use [a href=\"http://www.php.net/htmlspecialchars\" target=\"_blank\"]htmlspecialchars[/a] and [a href=\"http://www.php.net/htmlentities\" target=\"_blank\"]htmlentities[/a] to convert the single and double quotes. This is exactly what I'm trying to do. Here is the situation... Page one...Form Field for user to enter data. This data may have single quote, double quote, no quote or both quote marks. I have magic_quotes off in my PHP.ini file and on the insert page I'm using addslashes() around the $_POST[item]. The data is being entered into the database correctly, but when I bring the data back to be displayed in the form field, it drops anything after the single quote mark. I've tried adding htmlspecialchars() and htmlentities, but niether are working. I'm adding htmlentities() around the data I receive from my select statement before I try and display it in a form text box. BTW...I'm using PHP 5.1.2, Apache2 and MySQL 5.0.15 Please help! I'm pulling my hair out and I don't have much left to start with. Thanks, Dave
  17. Is this what you are after? select col1 where col2='A' and col2='B';
  18. I have now come to a conclusion about what the problem is. I've actually got three pages...the form is broken down into two input pages. I pass the info from the first page to the second where I'm putting the data into hidden form fields. Those are then passed with the new info from the second page onto the third page which actually adds the data into the database. What is happening is the data from the first page is getting double escape characters. I wanted to code it this way so I wasn't having to "hit" the database as often. Is there a way I can make it work the way I already have it coded? Thanks, Dave
  19. After pulling out a few more hairs and then reading your last message I realized you are correct. The slashes are already added to the string I get from my POST. So that was part of my confusion, but I'm still having a problem when I do the insert into the MySQL database. It drops everything starting where the ' was. I've determined it must be something different with the way I've configured this database vs. the other one I use where this works. I don't, however, have any idea what that change would be. Bothe databases are running on the same machine and I can't think of anything I would have done differently. Anyone out there have any thoughts? Dave
  20. I've tried many combinations of addslashes() and stripslashes() and I'm still getting the same results.
  21. I tried your suggestion and it worked, but I'm frustrated that one time it worked without having to do this and now on this new site it doesn't. It makes me a little unsure of my results. I didn't have to do this with my other site. It's also still not putting the data into the database correctly! ARRRHHHH!!
  22. OK...I think I have figured out a little more about my problem. I have two simple pages, a form and then a page that prints the data entered into the form. Page1 <HTML> <BODY> <FORM ACTION='test2.php' METHOD=POST> <TEXTAREA NAME='test' COLS=46 ROWS=7 ></TEXTAREA> <input type='submit' name='submit' value='Pass Off!'> </FORM> </BODY> </HTML> Page2 <HTML> <HEAD> </HEAD> <BODY> <?php print $_POST[test]; ?> </BODY> </HTML> If I enter text in the form that says... This is David's test text When it is printed on the next page it looks like this... This is David\'s test text It's like it is automatically doing the addslashes() function. Then by the time it gets to my database, everything after the \ is dropped. I have another site with very similar code and it works correctly...what am I missing here? Thanks, Dave
  23. That is the problem I have. The text in $Headline could contain either a single quote, double quote, both or neither. I need to be able to import the and display the text in any case. If addslashes() doesn't work is there another option, or am I just using addslashes incorrectly? Thanks, Dave
  24. A while back I posted a question about how to deal with single and double quote marks in a string that I was trying to post back to a form field. I was told to use addslashes(). This seemed like it would be the answer to my questions, but now when I put it into practice I'm getting problems. Here is the code I'm trying to use... <input type=text name='headline' size=63 tabindex=13 value='<?php print addslashes($Headline); ?>'> The problem is that with the code like this I'm getting a text field with a slash where my single quote should be and then everything else drops off. Any thoughts on what I could do to correct my problem? Thanks, Dave
×
×
  • 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.