Jump to content

Steveo31

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    steve+o+6500
  • Website URL
    http://www.phpfreaks.com

Profile Information

  • Gender
    Not Telling
  • Location
    San Jose, CA

Steveo31's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. medic's right. Single quotes won't work, but it's generally a good idea to use double quotes when dealing with variables inside arrays. If the value of the variable is a number, it could be either parsed as a key location, or a value. But as for what you need to do, make sure you are defining "$user" as an array before pushing somethine into it. Also, wouldn't you need to do [code] $user = array(); $username = $_POST['assoc']; $user[] = $username; $name = $user["$username"]; echo $name; [/code] What is the value of $_POST['assoc']? What kind of array are you trying to make?
  2. Or you could use the MySQL DATE_FORMAT function. Less PHP work. [a href=\"http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/5.0/en/dat...-functions.html[/a] [code] SELECT DATE_FORMAT(lastDate, '%M %D') AS formatted_date [/code]
  3. Personally I think case/switches are easier than do/while.
  4. Generally you can't take a script and expect it to work. Sadly, you need to learn the code and it will take a few months of work to understand it and get it to the point that you speak of. You can also hire someone to do it if you need it done NOW. That, or if you can isolate the problem you can post it here.
  5. Like... [code] if(..){    if(...){    } } [/code] Yea sure.
  6. If the from header is set correctly, you don't need to set the sendmail_from in the .ini. You'll notice that when the From: header isn't set, then PHP yells at you saying you need one or the other. In the case of sending mail out from a variable address, then you need to format the From: header the right way. It's been a hit or miss for me, but what seems to work is From:email@domain.com Notice there are no spaces. Sometimes a space will work, sometimes I need the < and > brackets, seems to depend on the server I am working on.
  7. It's a very roundabout way of doing it... little confusing on this end. Can you write a psuedo-code query of what you are after? I get what you want, but it's just... not clicking :)
  8. What is "date is this date", how are you getting those dates, etc?
  9. Only way I know is in the query it would be similar to [code] SELECT db1.products.color, db2.members.color FROM db1.products, db2.members [/code]
  10. NOW() is a function, not a translated value, so remove the single quotes. INSERT INTO table VALUES('something', 'other value', NOW(), 'other values);
  11. $open = f open("ipsforperson.txt", 'w'); f write($open, implode("\n",$file)); f close($open); Wouldn't work. The spaces between "f" and "write", etc are synatx errors.
  12. Hmm... maybe something like this: [code] session_start(); if(empty($_SESSION['this_page_unique'])){     $_SESSION['this_page_unique'] = rand(0, 10000000);     //show the rest of the page here }else{    echo "Go back.  You cannot refresh the page."; } [/code] As far as I know there's no Javascript that allows this. I could be wrong though.
  13. MySQL would be a better choice here, but if you dont have access, look into fopen(), fwrite(), fclose(), fread(). All functions you need. www.php.net/fwrite
  14. The IP thing will have to come from either a mysql DB or a text doc. MySQL would be the better choice as making a counter is very simple. Do you have access to a mysql database?
  15. Try adding "or die(mysql_error())" to the query it is referring to. If the rows arguement is throwing a fit, it's usually becuase the query isn't correct.
×
×
  • 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.