Jump to content

PeggyBuckham

Members
  • Posts

    37
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

PeggyBuckham's Achievements

Member

Member (2/5)

0

Reputation

  1. The reason you get the result you do is that your date wasn't in single quotes so it took it to be 10 / 8 / 13 (ten divided by eight divided by thirteeen) lol ... Now that was a careless move wasn't it! Thanks so much!! I also have another field in the database that has the timestamp in it. I always put a timestamp on almost everything. I just wanted a column with the date in a string so that my client could read it when the data was output onto a spreadsheet. Thanks Again!
  2. I have a script that, along with other data, uploads a date into database. The date is generated using the date() function. date('m/d/y'.time()); What gets put into the data base is: 0.1098901098461 If I echo out the date like this echo '<p>'.date('m/d/y'.time());.'</p>'; then I get the correct results: 10/8/13 Recently, after turning on php error messages on the server, I got an error (don't remember what it was exactly). I got rid of the error by putting this code in the header date_default_timezone_set('MST'); I've never had to set the default timezone before and I've never had problems with the date() function, but I know that someone out there can help me.
  3. OK. Thank-you. I will have to do some reasearch...Thank You for your patience!!
  4. No I was not going to ask the client for a spread sheet, I was going to ask the old developer. So are you saying that I can use the same code to access a Microsoft Access Database as I do to access a MySQL database? I thought I had to use asp to access it?
  5. Thank you for that answer. It seems like alot of work to go through just to get the data out of a database. I believe I will just ask for a spread sheet of the data. Thanks Again!
  6. I am unfamiliar with Microsoft Access databases. I am redoing a site for a customer. The old site was written in .asp and on a Microsoft Access databases database. I was given ftp access to the old site and it appears that the database is in a folder on a file with a .mdb extension. I am used to MySQL databases that I can look at the contents of the database in a browser. Can you please tell me is that not possible with a Microsoft Access database. If I want the content of the database so that I can use it to repopulate the new database. Should I just ask for a spreadsheet of the database or is there another way.
  7. So i do not understant mail servers: POP3, SMTP etc.. I got the emails to work by taking out the html code. This is not a solution. It is a work around. For the moment I am going to let it go becouse I did not have any complecated emails to send out on this site. Thank You premiso, for your help! I am not going to mark this as solved, but I am going to move on to other work
  8. Sorryi just saw the reply you left this morning. I will look... I have no idea how to figure out what mailserver I am using? But I will look into it.
  9. So I actually have to places where the code i wrote sends out an email. One of them already had the "from" from noreply@mysite.com. This morning I tested the sytem and it was working for both email. I had them sent to two diffrent email addresses each (4 emails). ...the system worked this morning, but it does not work now. I allso noticed that the emails being sent to my personal email were displaying the html code/tags. I am going to see what happens if I send out emails that are not htmls. This smight be a clue.
  10. OK I will try that. Yes I/we do control the mail server. It is a dedicated server from Godaddy. One of my co-workers upgraded the server and that is when the problem started.
  11. I have a page on my website that sends out a simple html email. This page worked a few days ago. Then last night when I was showing my client, it worked, but the email did not display properly (html code was visible in the email). Then today I can not get it to work at all. I have not changed my code, and I am using a script that I have used a lot of times. I'm not familiar with all the php settings on a server. I assume that one of these settings below are conflicting with each other. mail.add_x_header -- on mail.force_extra_parameters -- no value mail.log -- no value sendmail_from -- no value sendmail_path -- /usr/sbin/sendmail -t -i MAILTO -- root Also I had a similar problem a week ago. The email was not being sent out, then I played around with it, but did not actually change anything and it started to work again.
  12. Thank You! Actually i will study this and figure out all of the syntax you are using. Some is unfamiliar to me...but i need to learn. So Thank You!
  13. Ok this works. It just seems like I took something that should have been simple and turned it into something complicated. i will leave this open for awhile in case someone has any suggestions on how i could have made it simpler. But this worked. I just added another array. <?php //-------------------------------------------------------------------------make variable out of Post value foreach ($_POST as $key => $value) { $$key = $value; } $c = 1; $example_array = array( $c++ => 'Blue', $c++ => 'Green', $c++ => 'Yellow', ); $c = 1; $variable_array = array( $c++ => 'example_1', $c++ => 'example_2', $c++ => 'example_3', ); //----------------------------------------------------------------------------this is part of a form for($i=1;$i<=count($example_array);$i++){ echo '<p><input style="width: 15px; margin:0" type="checkbox" name="example_'.$i.'" value="'.$example_array[$i].'"'; if($$variable_array[$i] == $example_array[$i]){ echo ' checked="checked" '; } echo '/> '.$example_array[$i].'</p>'; } ?>
  14. Ok this should make more sense. I have an array that contains the values of checkboxes. I have used the array as part of a form. each checkbox has a different name...I know that is unusual, but i want to put the value(s) into separate fields of a database. I'm trying to get the value of the variables; $example_1 , $example_2 , $example_3. I am going to use this array later to read back the information that was submitted. I thought I was being clever so that in the future it would be easy to add to or edit the checkbox values. But I overlooked the fact that I did not know how do get the values of $example_1 , $example_2 etc. I will keep playing with it for awhile. I'm sure there is an answer. <?php //-------------------------------------------------------------------------make variable out of Post value foreach ($_POST as $key => $value) { $$key = $value; } $c = 1; $example_array = array( $c++ => 'Blue', $c++ => 'Green', $c++ => 'Yellow', ); //----------------------------------------------------------------------------this is part of a form for($i=1;$i<=count($example_array);$i++){ echo '<p><input style="width: 15px; margin:0" type="checkbox" name="example_'.$i.'" value="'.$example_array[$i].'"'; if('example_'.$i == $example_array[$i]){ echo ' checked="checked" '; } echo '/> '.$example_array[$i].'</p>'; } ?>
×
×
  • 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.