Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. looks to me like you're missing a couple of }'s one for your function and one for the first while right after it.  but that's just a guess. I bet i could make a better guess if you follow thorpe's advice.
  2. well..if you aren't storing any of this stuff in a database, and just wanting the time sent to you in your email, along with your other info..doesn't your email already have a timestamp already built in, for when you received the email? nonetheless, if you are wanting it to send in your email, look into php's [url=http://us3.php.net/time]time[/url] function.
  3. ^ assumes that the server is in CST...
  4. .josh

    Sorry

    you are probably triggering the IPS with your javascript. edit your code to do like <sc ript> etc..
  5. well, nothing is ever 100%.  There's really no way we could begin to give you an honest security assessment without looking at your script from top to bottom, and even everything else on your server, including the setup itself - which we don't really do.. but simple things like this will keep most of the little script kiddies at bay.
  6. well there is the application design forum. Is that what you are looking for? Also, we tried having both a "php newbie forum" and a regular "php help" forum before.  the regular one was for more advanced people and the newbie one was, well, for newbies.  But it didn't really work out all that well.  Newbies still posted in the regular forum, and non-newbie questions were still asked in the newbie forum.  So we decided to try to tackle the most common/newbie problems/questions by having a code/faq forum and *hope* people would go there first, and if they can't find what they need, then ask.  But even then that doesn't work all that well.  Mostly because people don't even bother reading the faqs or attempt to search for their answers. If you stick around long enough (as in, be active long enough) and continue to help people out (yes, I have noticed you helping people out. I think you even helped me out on a sql query a while back), you may just get yourself voted into the phpfreak recommended group, in which case, you will gain access to the proverbial "inner circle" of people around here - another possible thing which you may be looking for, when you refer to a more "advanced" discussion group.
  7. just wrap the href tags around the data like you normally would. For instance: [code] while ($list = mysql_fetch_array($result)) {   echo "<a href = 'someurl'>{$list['somefield']}</a><br/>"; } [/code]
  8. not with php. you can with javascript though. moving to javascript forum.
  9. select * from users where level in ('sales','admin') order by first asc
  10. just to clarify, you are only getting the last row because you keep assigning row info to the same variable and then overwriting it on each iteration of the loop.  You need to do like in sharkbait's example, where you create a new element in an array each iteration: the part where he has $i and it increments each time.  Or you could just leave that off and do this: $_SESSION['id'][] = $id; because php knows to create the next element without you explicitly specifying it (like with the $i)
  11. a) we don't do people's homework for them. b) we don't write people's code for them. We are here to help you out when you get stuck, while writing your own code.  If you wish for someone to write some code for you (in general), post an offer in the freelance forum.  However, I will tell you that if I see you trying to hire someone to do your homework for you here, I will delete your post, because that's just wrong.  How are you going to learn anything if you have someone do it for you? Thread closed.
  12. it's because you are using a posted variable directly in your query without sanitizing it. [code] $email = mysql_real_escape_string($_POST['email']); $result = mysql_query("SELECT email,username,password FROM userinf WHERE email='$email' ", [/code]
  13. [quote author=ToonMariner link=topic=118415.msg484043#msg484043 date=1166017127] for compliance you shoudl use <INPUT disabled="disabled" name="fred" value="stone"> [/quote] really? http://www.w3.org/TR/html4/interact/forms.html#adef-disabled
  14. can you post your script?
  15. with plain old html: [code] <INPUT disabled name="fred" value="stone"> [/code] moving to html forum.
  16. hmm.. [code] <?php session_id('blah'); session_start(); echo SID; ?> [/code] echos out PHPSESSID=blah
  17. is the codeblock you are providing possibly inside some other condition that isn't being met? Like..something having to do with this whole id business, or something?
  18. sure it can be done. but for the right price, by someone else, not by you. Don't mean to sound all jerk about it, but you aren't going to learn the skills necessary to do that and then finish your project in that time.  Just not going to happen.
  19. wouldn't that remove all occurrances of \n\r, not just 2 occurrances of it?
  20. extract($_POST);
  21. use $_POST['email']
  22. he's talking about email headers.  things like the to: and from: and subject are headers.
  23. I agree that 'product recommendation' features are pretty common on sites these days. However, it would be practically impossible to write a product recommendation tutorial. The problem with writing a tutorial explaining the actual code behind it is that the code would be very specific to your current system in place.  We would have to have an entire shopping cart/account example system in place already, to show how the 'product recommendation' would tie into it, from quering the database for things, to displaying it, etc. etc.. but it would only be a solution to our specific example cart, not your cart.  So on a practical level, the tutorial could only be on an application design level.  But even falling back on the application design, that in and of itself could get rather lengthy, and still wouldn't really be generic enough to be able to integrate into what you already have.  Also, Different sites have different 'rules' or 'ideals' as far as things being recommended. For instance, some sites may simply include a 'recommended products' list as an alias for 'most popular items,' or 'highest rated items,' in which case, what you are really looking for is a product rating script.  What you would need to do is have a field in your database that keeps track of total times any given product was bought and/or a field (or even a whole new table, depending on how detailed you want it to be: ex: do you want it to keep track of who rated it? keep track of comments from the rater? etc..)  that keeps track of the product rating. Then your 'recommended items' script would be a simple query sorted by rating, limited to say, 3-5 products, or something.  Most shopping cart scripts have product rating systems of some sort already implemented into it. So making a 'recommended products' script like this is more a matter of moding a specific script than making something in general (impossible to make a generic tutorial out of). Now, other sites might base their recommended products on related products.  If that is the case, you are going to have to modify your db structure to link products to each other.  This may or may not include making a whole new table, but again, 90% of it will involve what your database specifically looks like in the first place, so it's impossible to really write a generic structure for a tutorial.  And it would go even deeper, depending on your specific desires: do you want it to be your own custom list of items related to each other? Do you want it to be like "Users who bought this item also bought these items.."? Both?  I could go on all day with this, but hopefully you got the point.  The point is, the problem with making a tutorial like this is that it is pretty much impossible to make a generic script for a custom solution.  It's like having a board full of lots of different holes that are lots of different shapes and sizes and trying to make a one size/shape fits all peg to fit into those holes.  Just not going to happen. But that doesn't change the fact that you would like this feature for your shopping cart, so here's some practical advice for you:  If you designed and built your own shopping cart all by your onesies, then you probably (hopefully) wouldn't be asking a question like this in the first place.  So I'm going to assume that either a) you have a 3rd party script, or b) you [i]want[/i] to learn how to build one yourself, and you're looking for a more 'complete' tutorial, that includes this feature.  Well if the answer is b), then don't worry about it.  By the time you finish your shopping cart tutorials, and have learned to build it by yourself up to that point, you should probably (hopefully) have gained the skills necessary to do what you want to in the first place.  But if the answer is a), then again, square peg into round hole thing.  Your easiest option will probably involve hiring someone to make a custom mod to your existing cart. 
  24. not entirely random; a general thought, stemming from your comment.. Man, sometimes I feel like life is like a giant boat going downstream, and everybody has a paddle and is paddling as fast and hard as they can to make the boat go downstream even faster...except for me.  I'm in the same boat with everybody else, and I'm paddling too, only I'm trying to paddle upstream, against everybody else, against even the current itself. :( <keeps paddling>
  25. ic. well me personally, if i want to know what the weather is like, I get up and open the front door.  I don't really trust weather forecasts all that much. 
×
×
  • 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.