Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. If the root of your domain is /var/www.... you are clearly reaching outside of that with /usr.... Could you post the actual code you ran to produce this last post? Curious.
  2. Add this line echo "Root: {$_SERVER['DOCUMENT_ROOT']}<br>"; Let's see what you are using and determine if the /usr folder is part of your domain.
  3. I asked because I figure that SA is doing this work already so wondered why you felt the need to do it yourself. Have at it.
  4. I do not have any answer for you but I do wonder what you are trying to do. If you have SpamAssassin running, why do you want to run your own php script to identify spam? Isn't that why you have SA running? And how do you intercept the emails before SA gets them?
  5. We seem to not be communicating very well Good luck.
  6. I don't see the "this" you refer to. How many records were returned? And please don't post code that is simply a flowing block of text. Very hard to read and make sense of. And if that is how you are writing your code I strongly suggest you change your style. And what is it you expect to see? And this is not using any prepared statements.
  7. Regardless of how the rest of your code is written, the simple use of a variable in a calculation does not require parentheses around it. Just trying to teach here.
  8. Happy that you db problem was cleared up. But getting back to my question, why are you wrapping var names in parens? Completely unnecessary.
  9. Why is $user_token in parens? And why is your if statement doing the same thing regardless of the existence of submit3?
  10. So those values in the string - how do you plan on using them? Are they just a reference that you will only use to provide some info about the record key that you will display just to help highlight that record? You cannot use the field when you want to find all of the "women" in your table, nor for any of the other parts of the string. Modern RDBMS work really fast and make finding the data that is stored very easy to find. IF IT IS STORED CORRECTLY. Using a string of various elements that would have to be searched is not the correct way. You have a link that is tied to that string such as the record key. You create the 2nd table as a lookup table of all the values that can be related to each record key in the 1st table. Then you an write a query that pulls in the desired record keys and joins those records to the records in the table 2. This is the way it is done. Period. Between all of the responders to this topic it should be clear to you now that this is how it is done.
  11. BTW - do you really expect your database values to contain html code in them? Like will someone's last name have something other than a legitimate name value in it? Or a phone number? or a contract type? Those values should have been validate before being saved so as to guarantee that they were valid values. A contract type should have been checked against a lookup table that contains all of the valid types so that you know that your database is accurate. I really don't see how any of your table elements would have any html code in them if you did all of the checking during the save process.
  12. A var dump of the object simply shows you the query, no results. Are you checking for how many rows were returned? PS - when you write a query you can use an alias for the table name such as just a 't' instead of the whole table name. Saves an awful lot of typing. Ex. $q = select t.field1, t.field2, t.field3 from tablename t where t.id='abc'";
  13. Forget what I asked.. It's not a normal html file upload.
  14. Then I must have done something wrong when I used urlencode as well? Never had to do anything like this before cause I never had a parms with an & in them before. It's quite possible I did something wrong but it all ended up just fine.
  15. ginerjm

    Zdenko

    Show us the code please and point out the exact line that is giving you the error
  16. But as I've discovered the original tip to use urlencode and then the decode version solved my problem. And so Quickly! Thanks guys.
  17. ginerjm

    Zdenko

    If ($value{0} is supposed to be an array reference you are doing it wrong. Correct array references use square brackets, not braces
  18. As you can see my incoming url had the + chars in it and I had to dump them. They were a direct result of doing the encode. Prior to that I had ampersanded numbers (chars) in the query value.
  19. ginerjm

    Zdenko

    I hate them. Did you have something else to say?
  20. Never mind - Discovered the function "urldecode". Thanks to Kicken.
  21. OK - this is what I attempted. $url_qry = urlencode($c); echo "c is $c and url_qry is now $url_qry<br>"; Then I output my html with echo "<a href='members_by_age_rpt.php?range=$url_qry'>$c</a>"; but what does my receiving script have to do to interpret that range value now? http://xxx.com/tools/members_by_age_rpt.php?range=25+%26+Under This is what comes in.
  22. Don't know why the site created a second topic of this item. There is some kind of change that asks one to supply an answer to recognize solutions that I never saw before. Must me that. And for all I know there may be another.
  23. I have never had to deal with this so I'm a bit lost. I have a php script that needs to send an anchor tag that looks like: members_by_age_rpt.php?range=25%20&%20Under With PHP the problem is I don't know what I have to do to the 'range' value to make it recognizable. Tried html_entity_decode but that doesn't seem to be the proper treatment. So what is it I have to do to end up with a proper 'range' value/string of "25 & Under"?
  24. What device counts an atm card? Never heard of even a need for that. And just what does this question have to do with PHP - a computer language, not exactly a "card counter". A device? You mean like some machine?
×
×
  • 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.