Jump to content

Cep

Members
  • Posts

    539
  • Joined

  • Last visited

    Never

Everything posted by Cep

  1. I have to ask this question but this data is not security sensitive is it? If so I would seriously suggest NOT using email as a transfer medium. Just replace the values in your HTML with variables, run a query or conditional statement on the store/location (though I cannot see where you get this), populate the variables with the necessary data for that store and this will help you to make it dynamic.
  2. You don't edit these settings in IIS you navigate to your inetpub folder using My Computer and then use the folder properties to bring up the security tab.
  3. I am failing to understand what you mean if you received the "this is a test message" then you have received the email from the code. What you now need to do is customise the code and change the data within the variables $msg_body for the email body text, $subject to whatever title you want the email to be sent with and to thirdly change the header info for the FROM address to whatever you need.
  4. You have to use Javascript or another browser scripting language in order to do this.
  5. You need to go to the parent folder in My Computer. You then need to right click the parent folder (I would probably choose your profile folder as the parent) then go into properties -> security -> add -> type the IUSR_servername (where servername is the name of your computer) and then give them read & execute/write/read permissions.
  6. Are you redirecting to a page on your server or a page on an external server?
  7. Hi there, With Windows you have to specify the entire path, so it would be, mkdir(c:/Inetpub/wwwroot/profile/newuser01); You do not need the mode as windows ignores this. The only thing you need to make sure is that IUSR_servername has write permissions on the folder.
  8. ROFL... Yes souki you need wrap all php code in php tags or else the code will not be interpreted as php code Please let us know how you get on.
  9. Are you saying that your script outputted this to the web browser? $msg_body = "This is just a test"; $header_info = "MIME-Version: 1.0\r\n"; $header_info .= "Content-type: text/html; charset=iso-8859-1\r\n"; $header_info .= "From: Test User<system@testemail.com>"; $subject = "Testing Email"; $recemail = "testemail@testemail.com"; if (mail($recemail, $subject, $msg_body, $header_info)) { $message = "Your message has been sent. We will contact you as soon as we can."; }else{ $message = "There was an error while processing your request. Please contact us by phone if you see this error."; } echo $message If that's the case, you did surround this in php tags and saved it to a webserver which has PHP4/5 running on it?
  10. You should really do the check on both fields before the checks on singular fields as in the above example, a value for portsmouth and all will not be evaluated because portsmouth evaluates already prior to your code reaching that final elseif.
  11. Where in your script is $email_message and $username being set?
  12. I am not 100 % sure what your trying to do, but this is what I think, <?php //read in your search filter fields if ($field1=="all" && $field2=="all") { $sql = "SELECT * FROM mytable"; } else { //All your other possible conditions here for example $sql = "SELECT * FROM mytable WHERE field1 = $field1 AND field2 = $field2"; } ?>
  13. I have had to basically reinstall everything in order to get this resolved trying to track an answer down was not as quick if anyone needs instructions these are the best http://www.tjitjing.com/blog/2006/05/php5-with-iis6-on-windows-server-2003.html
  14. Hello, Personally I would reinstall your PHP, and follow these instructions as IIS can be a bit of a mare to set up correctly. http://www.tjitjing.com/blog/2006/05/php5-with-iis6-on-windows-server-2003.html Plus you should NEVER set the everyone user group to have full access, in fact its best practice to remove this group from your permissions entirely and in this case just use the IUSR_SERVERNAME account.
  15. I am not 100% with class/objects but arent you supposed to have echo $someObject->id; not $echo someObject->$id;
  16. I am having just that problem now! I wrote a rather large system several years ago and now it needs updating, ye-gads my coding is bad. Glad I recently went on part one of my ZCE course
  17. Lol certainly is! Though I like Orio's AV! My S-Q-L getting back on topic
  18. Hello, I used to have on my Win2k3 box, PHP 4.1 and a Mysql 4.1 database server. I decided as I am moving to PHP5 to upgrade Mysql as well. I have removed the previous versions and decided to start from scratch. I have done the following, Installed PHP 5.2.5 and enabled all the extensions, Installed MySQL 5.0 and set a new username and password, I have tested PHP is working using phpinfo() and can see that my php is working and that all the extensions are present. The problem is that when I run a script that uses any mysql functions IIS will continue to return a blank page, in the logs it returns and internal server 500 error (as useful as that is) and nothing else happens. I have checked PHP.ini and e_all is set for my error reporting. The next thing I do is remove my mysql functions from the script and do a simple echo test and I then get a response. When I uncomment the mysql lines, I again get a blank page. I have tried to test this from another server and I now get error messages/notices appear as an output giving me the following, However I do not understand this because surely if this is a new MySQL installation it should be using the new 41bit hash and this error normally occurs when using an old password? Can anyone help?
  19. Hi, I was just wondering if people could put forward some points on what I should keep in consideration when writing a php script that will synchronise a MySQL database with an Access database (and visa versa). I am writing a script at this moment and I just wanted to know if anyone could give me some things to look out for when coding such a script? For example, does the record already exist? Check to see if a duplicate has been created? etc etc
  20. Cep

    age of consent

    Kellz, I know from experience that a lot of girls I know who waited till they were in their 20's feel a lot better about themselves then girls who were at it when they were 14 to 18. The age of consent is there for a legal reason, its there to protect children, as that's what you are under that legal age no matter how adult you really are. Just because you consent does not mean you are in the eyes of the law responsible should something go wrong. Take for example the worst case scenario, You get pregnant, your boyfriend leaves you (or dies), your parents cannot support you and/or your child? How will you provide for your baby? You are not legally allowed to work so you cannot earn a wage and even if you were old enough you need a considerable amount to raise a child and not even people in their late 20's can usually afford that. I have known people in your situation, take for example my friend Emma, she was in a relationship for 5 years, moved in with her boyfriend at 16 and at age 17 she fell pregnant. Now she said exactly the same as you about her boyfriend at the time "we are in love we will never be seperated" however things change in a relationship when something as monumentus as a child comes into play. Anyway they grew apart, they eventually split up, she had to move out the flat,she could not go home and she had to give her child to her aunt to look after whilst she worked 12 hour shifts each day in a factory. Its now 12 years later and she has only just managed to get a rented house, and Abby (her daughter) is still having to stay round her aunts until the evenings after school because her mother isn't at home during the day to look after her. Now as perfect as your situation is, throw in an extra few things, your boyfriend is arrested and jailed for rape added to the sex offenders register and your child is born with some sort of disability? Dropping the age of consent doesn't help you either, lets say they did drop it to 14? Your on a park at night, you have been drinking (I know it happens I've been there meself ) some man leads you off somewhere and rapes you, then when they are arrested they insist it was consensual sex and there is no real evidence against it? What do you do then? And what if you fall pregnant then? The law at least protects you to some degree, trust me don't throw your "honor" away so young.
  21. Hi Orio, Well I was trying to make the name of the container a variable value equal to the filename. The code does actually do this with an array but because filename is a string it throws the notices at you. However I did think the implementation was a bit sketchy at best. Thanks for your help
  22. Hello! This is what I am trying to do: I have an array like this, array ( array($path, $ext, $file), array($path, $ext, $file), ..... ) I need to split $file to obtain its version number and file name so that I can eventually get the latest version of each file present in the array. So I can change this, $array = array( array("\\myplace\", "pdf", "davesfile~001.pdf"), array("\\myplace\", "pdf", "davesfile~002.pdf"), array("\\myplace\", "pdf", "davesfile~003.pdf"), array("\\myplace\", "pdf", "craigsfile~001.pdf"), array("\\myplace\", "pdf", "craigsfile~002.pdf"), array("\\myplace\", "pdf", "craigsfile~003.pdf"), array("\\myplace\", "pdf", "craigsfile~004.pdf"), array("\\myplace\", "pdf", "waynesfile~003.pdf") ); into this, $array = array( array("\\myplace\", "pdf", "davesfile~003.pdf"), array("\\myplace\", "pdf", "craigsfile~004.pdf"), array("\\myplace\", "pdf", "waynesfile~003.pdf") ); I have started writing a function to do this, it will take the file array as above and foreach sub array it will explode $file into its name and extension and then explode it again to split the name from the version. At this point I am at a stumbling block trying to figure out how to test the data and I keep getting array to string notices when using variable variables. Can anyone help me out? <?php function sort_files($filearray) { // Array = (array($path, $ext, $filename),array($path, $ext, $filename)); $myarray = array(); $varray = array(); foreach ($filearray as $fileinfo) { // Split name and extension $split_name = explode(".", $fileinfo[2]); // Split name and version $split_further = explode("~", $split_name[0]); // Assign filename and version $filename = $split_further[0]; $version = $split_further[1]; // Assign varray with the filename, eg. $$varray = "myfile"; $myfile = array(); $$varray = $filename; // Find is filename exists in new array if (in_array($filename, $myarray)===false) { $myarray[] = $filename; } else { $varray[] = $version; } } return $myarray; } $array = array( array("here", "ext", "davesfile~001.pdf"), array("here", "ext", "davesfile~002.pdf"), array("here", "ext", "davesfile~003.pdf"), array("here", "ext", "craigsfile~001.pdf"), array("here", "ext", "craigsfile~002.pdf"), array("here", "ext", "craigsfile~003.pdf"), array("here", "ext", "craigsfile~004.pdf"), array("here", "ext", "waynesfile~003.pdf") ); $newarray = sort_files($array); echo "<pre>"; var_dump($newarray); echo "</pre>"; ?>
  23. FF2+ Because its the best out there, and follows web standards!!
  24. Is PHPfreaks not part of the webfreaks thought? And don't they run their own hosting? I could be mistaken
  25. LOL, I know what you mean Ober! Anyhoo just thought I would mention I am getting these errors too and at the same time getting an error on the SMF forums. I take it recently we have had a lot more traffic hitting the site than usual as it appears to be too many connections causing the problem? Cheers Cep
×
×
  • 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.