<M/> 170 Why so serious? Featured Poster

Based on the reported cost of the Iraq/Afghanistan wars for the last 13 years of $1.6 trillion, the cost of those wars, per hour, is approximately $14 million. That's for each and every hour for the last 13 years.

Wow, when you break the numbers down like that, it makes the cost look much more shocking.

<M/> 170 Why so serious? Featured Poster

A csv file is meant to hold data.

Right, that's what i meant to say :P I am using it to hold the data that is collected when the form is submitted.

Have you tried omitting $message from your CSV to see if styling still comes through?

I think the issue has to do with $message because the styling of the email shows up rather than the comment that gets submitted. I haven't had success figuring out what to do with $message... i keep leading myself into error messages :P

what error is it giving?Can you give screen shot of error?

I don't think i should refer to it as an "error" but rather the unwanted result :P

I didn't realize that I forgot to attach what it looked like when I run it. Here is the preview: Capture.PNG

I managed to get through the issue where the numbers show up as "#" and all i did was increase the width of each cell on excel... basically, the "only" issue is that the message does not show, the styling of the email shows, and when the form is run on the actual site, you see a glimpse of the tables that get sent to me for literally half a second (if you guys want to see what i mean, i can send you each a link).

<M/> 170 Why so serious? Featured Poster

Well... a bloke just refers to a man... or a fellow...

Anyways, when I get home, I will try to make an effort to getting involved with your question... I am stuck at a wedding... and it won't end until 2 or 3am... hopefully it ends sooner

<M/> 170 Why so serious? Featured Poster

Here is a site dedicated to bitcoins: https://bitcoin.org/en/getting-started

GrimJack commented: Good link! I did not dig deeply to see if they covered ming +0
<M/> 170 Why so serious? Featured Poster

Welcome!

I hope I fallen in good hands.

Daniweb is on your side.

<M/> 170 Why so serious? Featured Poster

He actually didn't say anything wrong to start any argument. He just said that you have some of the top people helping you out with your problem and that he can't help you (implying that the 2 that are helping you are better assistance). He didn't say anything bad.

Your next post, which came right after his, was talking about the fact that you were dissatisfied with something about posting here and then the problems started from there.

Its the little details that matter. Either you read almostbob's comment as an insult or you just didn't understand what he was implying.

So relax. If something like this happens and it offends you, just flag it. Daniweb's admins will make sure your problems are resolved. Don't look at the posts as a way to discourage you from posting on this forum, or any, just look at it as advice. Attacking fire with fire typically doesn't help anyone.

JorgeM commented: +1 for peacekeeping. +12
<M/> 170 Why so serious? Featured Poster

I am trying to collect my form inputs into a csv file and for some reason the csv file records some of the styling and does not display numbers (phone number and date). I am not sure where I got it wrong. Here is what I have so far.

<?php 
    $name = $_POST["name"];
    $email = $_POST["email"];
    $phone = $_POST["phone"];
    $meeting_type = $_POST["meeting_type"];
    $time = $_POST["time"];
    $message = $_POST["message"];
    $to      = 'yahoo@gmail.com';
    $subject = 'Contact Form Submission';

    $v1 = "
            <html> 
            <body> 
            <style>
                h1 {color:#000066;}
                table {border:1px solid black; background: #e3f0ff;}
            </style>
            <h1>Hello, this form has been submitted!</h1>
            <img src= 'site.png' />
            <table rules='all' style='border-color: #ffb300;' cellpadding='10' width='500px'>
                <tr style='background: #ffb300;'><td><strong>First Name:</strong> $name</td>
                <tr style='background: #fafafa;'><td><strong>Email:</strong> $email</td>
                <tr style='background: #fafafa;'><td><strong>Phone:</strong> $phone</td>
                <tr style='background: #fafafa;'><td><strong>Reason for Contact:</strong> $meeting_type</td>
                <tr style='background: #fafafa;'><td><strong>Best Time to Contact:</strong> $time </td>   
                <tr style='background: #fafafa;'><td><strong>Comments:</strong> $message</td>
            </table>   
            </body> 
            </html> ";
    $message = $v1; 
    $headers  = "From: $from\r\n"; 
    $headers .= "Content-type: text/html\r\n"; 
    mail($to, $subject, $message, $headers); 
    echo "Message has been sent..."; //Page RE DIRECT 
    echo $v1;
//******************************************************************************************************************************//

    $name = $_POST["name"];
    $email = $_POST["email"];
    $phone = $_POST["phone"];
    $phone = $_POST["phone"];
    $meeting_type = $_POST["meeting_type"];
    $time = $_POST["time"];
    $message = $_POST["message"];
    $subject = 'Message Confirmed!';
    $v1 = "
            <html> 
            <body> 
            <style>
                #disclosure {font-size: 8px; color: #333;}
                h1 {color:#000066;}
                table {border:1px solid black;}
            </style>
            <img src= 'site.png' />
            <table rules='all' style='border-color: #ffb300;' cellpadding='10' width='500px'>
                <tr style='background: #ffb300;'><td><strong>Email Confirmation</strong>
                <tr style='background: #fafafa;'><td>Hello <strong> $name</strong>, your message has been recieved! We will contact you shortly! <br><br>Best, <br>Me<br>An awesome person<br><br>Follow Us On:<br><a href='http://www.facebook.com'><img src='facebook_hover.png' …
<M/> 170 Why so serious? Featured Poster

Only difference is that's just one variable. I want two things to select which is displayed.

I maybe wrong, but are you asking if you can create a way where if you press one button, both videos/images show?

<M/> 170 Why so serious? Featured Poster

Your link redirects us back to this thread, do you have the correct link by any chance to the fiddle?

<M/> 170 Why so serious? Featured Poster

Ben, you have to understand that people are very sensitive to tone. Saying things like "happy now," "keep telling yourself that," I don't believe your helping" really just shows disrespect to those who help you. You have to remember that the people here who are helping you are experienced at what they do, so show some respect. Imagine talking to your parents like that, do you think they will like it? They most likely will not.

You are on a forum working with someone to solve a problem (every forum is the same), your not texting your friends. Just keep that in mind.

<M/> 170 Why so serious? Featured Poster

Usually the ads are the most interesting part on the TV screen, even though the numerous ads for medicines are strange, many of them don't mention what the drug is for, but then lists, in a fast voice, the many side effects, some rather scary. Loss of vision, loss of liver and loss of life amongst them.

I like those ads where they show you a magical pill that does x and before you use it you have to consult with your doctor because of the double digit problems it can create for your health. "Are you over 50? talks about some dude and his life for a minute and how he overcame his problem then says Take Viagra now! says 80 words that we can't understand, then says But before you do, make sure you consult with your doctor because users may develop: diaheria, cancer, nervous breakdown, CJD, shrinkage of genital area, different color in urine, stroke, and..." Lets be honest here, we always see ads like that :P

<M/> 170 Why so serious? Featured Poster

You can try the purifier, i mean they work, but I am not too sure if they are 100 percent effective against smokers. Also, even if he gets a new tenant, i am sure they will move out soon with a smoker as their neighbor.

<M/> 170 Why so serious? Featured Poster

"more homework die('lazy student');"

I think i should use that one...

"Dont drag up old crap. If some other idiot drags up old crap, dont reply"
"Do your own bloody homework"
"How dumb do you have to be ?"
"you could just -eff off"
"get off your lazy @ss and make an attempt"
"of course it expects others to do its homework"

I already use these...

<M/> 170 Why so serious? Featured Poster

I like Moz.com

<M/> 170 Why so serious? Featured Poster

I actually requested a username from them a couple of weeks ago... they never got back to me... they are still in beta mode, so who knows what will happen.

<M/> 170 Why so serious? Featured Poster

Happy Early New Year!

<M/> 170 Why so serious? Featured Poster

Welcome!

<M/> 170 Why so serious? Featured Poster

I know you live in an area where the area is not smokefree, but can't you tell the landlord to get the other tenant to not smoke/control his smoking or you will leave/are getting sick from it?

<M/> 170 Why so serious? Featured Poster

Those who can, do
Those who can't, teach
Those who can't teach, write

Those who can't write, speak. :)

But even then... can't you write to teach what you do? :P

<M/> 170 Why so serious? Featured Poster

Give me hot weather, you can always remove more clothes.

Just keep it legal and stay away from the children when it gets too hot then ;)

<M/> 170 Why so serious? Featured Poster

hell

<M/> 170 Why so serious? Featured Poster

Almost all experts say that? I thought most experts say it was the north koreans... i mean, that would be a good guess.

<M/> 170 Why so serious? Featured Poster

That background for the login looks pretty awesome

<M/> 170 Why so serious? Featured Poster

President Harrison died about a month after becoming a president.

<M/> 170 Why so serious? Featured Poster

AHHHHHHH, i feel so dumb. I forgot to change the form method to the way broj1 said it should be :P. The form works now! Now, all i gotta work on, at this point is security, captcha, and ways to avoid spam and have proper inputs submitted :P (expect later questions from me about this ;)).

Thanks guys!

Question = Solved.

<M/> 170 Why so serious? Featured Poster

@traevel, I tried running your code and the problem i have with it atm is that when i run it, i get the same results except for the fact that the table and email submission confirmations show up on the webpage after the form gets submitted. did i do something wrong?

<M/> 170 Why so serious? Featured Poster

@Traevel,

Here's the code, just uncomment the scripts and mail functions again.

Are you saying that I need the lines that are commmented out or that they are optional?

Also, within your code, how do you connect the php file to the html form? I don't see how you did it because the form method you put doesn't show the php file (unless i am just totally off and need to re-read a php book...).

<M/> 170 Why so serious? Featured Poster

Just to add so you keep this in mind... You seem to have a lot of repetitive code on the page. You should consider using classes, creating objects, using subroutines, etc so you can reuse your code easily within your web application.

Yeah, i began noticing that. When I finish getting through my current problems, i will begin cleaning up all my code :)

<M/> 170 Why so serious? Featured Poster

Out of curiousity, when i set up the form method, is it case sensitive? Like, am i allowed to do <form method="POST> instead of <form method="post"? I had mine done in all caps, so idk if i should do that or not.

That is an interesting form layout, nice!

Thanks :P

Thanks you guys, Broj1, imti321, JorgeM, and Traevel (i gave you all rep points)! I am gonna try all these solutions out... i actually did not expect this much activity to help me on this thread to happen over night :P So thanks a lot! I will get back to you guys within an hour so (I have a basketball practice today for my school, during winter break...).

<M/> 170 Why so serious? Featured Poster

Placebo worked for ages, and it still does!

I think water is a great placebo... people give it to those that are hurt and "magically" it heals them when water has no healing abilities... :P

<M/> 170 Why so serious? Featured Poster

Well, i noticed that a lot of people, on the envato marketplaces, get other people's templates and just quickly modify them. They just buy/download a complete template, and then make a few quick changes and use as their own. Idk if that is even allowed, but thats what they do.

If you want to build sites faster using templates, make sure you have created a few sites of your own and use those as templates.

<M/> 170 Why so serious? Featured Poster

@JorgeM, don't forget the semicolon ;)

So, background-repeat: no-repeat;

JorgeM commented: Touché +12
<M/> 170 Why so serious? Featured Poster

Could the issue be coming from $v1? I removed the styling and just left it to just spit out the variables' values and apparently nothing shows. Either the inputs are not being collected or php is just really poorly done. Any suggestions/ideas?

<M/> 170 Why so serious? Featured Poster

Here is an updated version of my code:

  <?php 
                    $name = $_POST["name"];
                    $email = $_POST["email"];
                    $phone = $_POST["phone"];
                    $meeting_type = $_POST["meeting_type"];
                    $time = $_POST["time"];
                    $message = $_POST["message"];
                    $to      = 'email@gmail.com';
                    $subject = 'Contact Form Submission';

                    $v1 = "
                            <html> 
                            <body> 
                            <style>
                                h1 {color:#000066;}
                                table {border:1px solid black; background: #e3f0ff;}
                            </style>
                            <h1>Hello, this form has been submitted!</h1>
                            <img src= 'logo.png' />
                            <table rules='all' style='border-color: #ffb300;' cellpadding='10' width='500px'>
                                <tr style='background: #ffb300;'><td><strong>First Name:</strong> </td>$name
                                <tr style='background: #fafafa;'><td><strong>Email:</strong> </td>$email
                                <tr style='background: #fafafa;'><td><strong>Phone:</strong> </td>$phone
                                <tr style='background: #fafafa;'><td><strong>Reason for Contact:</strong> </td>$meeting_type
                                <tr style='background: #fafafa;'><td><strong>Best Time to Contact:</strong> </td>$time    
                                <tr style='background: #fafafa;'><td><strong>Comments:</strong> </td>$message
                            </table>   
                            </body> 
                            </html> ";
                    $message = $v1; 
                    $headers  = "From: $from\r\n"; 
                    $headers .= "Content-type: text/html\r\n"; 
                    mail($to, $subject, $message, $headers); 
                    echo "Message has been sent..."; //Page RE DIRECT 

//******************************************************************************************************************************//

                    $name = $_POST["name"];
                    $email = $_POST["email"];
                    $phone = $_POST["phone"];
                    $phone = $_POST["phone"];
                    $meeting_type = $_POST["meeting_type"];
                    $time = $_POST["time"];
                    $message = $_POST["message"];
                    $subject = 'Message Confirmed!';
                    $v1 = "
                            <html> 
                            <body> 
                            <style>
                                #disclosure {font-size: 8px; color: #333;}
                                h1 {color:#000066;}
                                table {border:1px solid black;}
                            </style>
                            <img src= 'logo.png' />
                            <table rules='all' style='border-color: #ffb300;' cellpadding='10' width='500px'>
                                <tr style='background: #ffb300;'><td><strong>Email Confirmation</strong>
                                <tr style='background: #fafafa;'><td>Hello <strong> $first_name</strong>, your message has been recieved! We will contact you shortly! <br><br>Best, <br>Me<br>An awesome person<br><br>Follow Us On:<br><a href='http://www.facebook.com'><img src='facebook_hover.png' width='18' height='18'></a><a href='http://twitter.com'><img src='twitter_hover.png' width='18' height='18'></a><a href='http://google.com'><img src='gplus_hover.png' width='18' height='18'></a><br><div id='disclosure' align='right'>©me™ All Rights Reserved 2014-2014 </div>
                            </table>   
                            </body> 
                            </html> ";
                    $message = $v1; 
                    $headers  = "From: $from\r\n"; 
                    $headers .= "Content-type: text/html\r\n"; 
                    mail($email, $subject, $message, $headers);    

                        $count= count(file("main_form.csv"));                       
                        $today …
<M/> 170 Why so serious? Featured Poster

@Traevel, i sent you a link to the page, idk if that will help

<M/> 170 Why so serious? Featured Poster

<td><strong>First Name:</strong> </td>$name

Yeah, those lines concern me. Idk if i am doing those correctly.

<M/> 170 Why so serious? Featured Poster

Just wondering what IDE/Editor you're using as many errors should be highlighted.

Coda 2, its pretty fast and not as "laggy" as dreamweaver cc.

you need to either add name="email" or change value to name if you haven't yet.

I need to have name as well?

But even if you did, there are two unknown variables in there $telephone on line 24 instead of $phone and $from instead of $email on line 32.

Sorry, i was changing the variable names, just imagine that telephone is phone and email... is well, email. :P

@Traevel, if i sent you a link of my page, would that help?

<M/> 170 Why so serious? Featured Poster

can anyone make me a working login system, like login, register, and send all files + the Database file (Test DB file)?

We can make it. But we are not going to make it for you.

if anyone have some old codes!

Most old codes end up on the internet... in fact, at this time and age, its almost 2015... you can basically google your needs...

How is it insulting you, waow!?

It is insult to ask someone with experience to do what you want without a reward.

Please be kind, it doesn't take long to made...

Then why not spend the time and learn it... if it doesn't take long, of course.

currently 5 downvotes - which is spectacular

6 downvotes...

<M/> 170 Why so serious? Featured Poster

Could the issue possibly come from the fact that I use both id and value? Idk why i get a feeling that those 2 maybe a problem.

Does $v1 contain all the variable information if you printed it to screen instead of mailing?

I think so, i am not sure if i did it correctly (all my code, aside from my css is pasted above).

If not you could wrap the $_POST's with isset's to make sure they are all set properly.

Where would that go within my code?

Perhaps it's somewhere in those long strings, an unescaped quote in a variable or something.

Its possible, i do have a habit of making long strings... that well, fail :/

You could rewrite it using the heredoc syntax to avoid all the quoting and escaping, if all else fails.

I will look into the heredoc syntax

<M/> 170 Why so serious? Featured Poster

Okay, i managed to get the form to send me a verification, which is good. Now a new problem i have is that the form inputs that get sent to me don't show up. It would show up as something like: name:_________ rather than something like name: bob. Also, the user who submitted the form does not get a copy of it, and i am not sure why that is.

The form looks like this atm:
Screen_Shot_2014-12-27_at_5.45_.31_PM_.png

<M/> 170 Why so serious? Featured Poster

I think he means $meeting_type = $_POST["meeting_type"] as the 5th one that needs a semicolon at the end.

This is probably JorgeM right now thinking about me not being able to understand what he meant :P

And I think you have to use the name attribute instead of the id for identifying the element. So if the name of the selection is meeting_type you would get 1, 2, 3 and so on in the $_POST['meeting_type'].

I can't use both even if they have the same value? Like both id="dog" and name="dog"?

<M/> 170 Why so serious? Featured Poster

Hmm, i see the error on line 43 but idk about the error you see on line 5? I need a semicolon there?

<M/> 170 Why so serious? Featured Poster

You mean on line 22-27 of my php file?

<M/> 170 Why so serious? Featured Poster

Okay, so i am getting further with my form and I seem to get errors (error on line 17 when the form is submitted). Is there anything wrong with my form? Here is the code so far (php):

<?php 
                    $name = $_POST["name"];
                    $email = $_POST["email"];
                    $phone = $_POST["phone"];
                    $meeting_type = $_POST["meeting_type"]
                    $time = $_POST["time"];
                    $message = $_POST["message"];
                    $to      = 'myemail@gmail.com';
                    $subject = 'Contact Form Submission';


                    $v1 = "
                            <html> 
                            <body> 
                            <style>
                                h1 {color:#000066;}
                                table {border:1px solid black; background: #e3f0ff;}
                            </style>
                            <h1>Hello, this form has been submitted!</h1>
                            <img src= 'logo.png' />
                            <table rules='all' style='border-color: #ffb300;' cellpadding='10' width='500px'>
                                <tr style='background: #ffb300;'><td><strong>First Name:</strong> </td>$name
                                <tr style='background: #fafafa;'><td><strong>Email:</strong> </td>$email
                                <tr style='background: #fafafa;'><td><strong>Phone:</strong> </td>$telephone
                                <tr style='background: #fafafa;'><td><strong>Reason for Contact:</strong> </td>$meeting_type
                                <tr style='background: #fafafa;'><td><strong>Best Time to Contact:</strong> </td>$time    
                                <tr style='background: #fafafa;'><td><strong>Comments:</strong> </td>$message
                            </table>   
                            </body> 
                            </html> ";
                    $message = $v1; 
                    $headers  = "From: $from\r\n"; 
                    $headers .= "Content-type: text/html\r\n"; 
                    mail($to, $subject, $message, $headers); 
                    echo "Message has been sent..."; //Page RE DIRECT 

//******************************************************************************************************************************//

                    $name = $_POST["name"];
                    $email = $_POST["email"];
                    $phone = $_POST["phone"];
                    $telephone = $_POST["telephone"];
                    $meeting_type = $_POST["meeting_type"]
                    $time = $_POST["time"];
                    $message = $_POST["message"];
                    $subject = 'Message Confirmed!';
                    $v1 = "
                            <html> 
                            <body> 
                            <style>
                                #disclosure {font-size: 8px; color: #333;}
                                h1 {color:#000066;}
                                table {border:1px solid black;}
                            </style>
                            <img src= 'logo.png' />
                            <table rules='all' style='border-color: #ffb300;' cellpadding='10' width='500px'>
                                <tr style='background: #ffb300;'><td><strong>Email Confirmation</strong>
                                <tr style='background: #fafafa;'><td>Hello <strong> $first_name</strong>, your message has been recieved! We will contact you shortly! <br><br>Best, <br>Me <br><br>Follow Us On:<br><a href='http://www.facebook.com'><img src='facebook_hover.png' width='18' height='18'></a><a href='http://twitter.com'><img src='twitter_hover.png' width='18' height='18'></a><a href='http://google.com'><img src='gplus_hover.png' width='18' height='18'></a><br><div id='disclosure' …
<M/> 170 Why so serious? Featured Poster

So far, i have something like this for my html:

I would like to schedule a(n) 
                    <select>
                        <option value="1" selected>consultation</option>
                        <option value="2">appointment</option>

How do i get the value/input from that using php?

Sorry if this is a dumb question, i haven't wrote much php for the last year or so. (I can post all my php/html form if needed)

<M/> 170 Why so serious? Featured Poster

I created a form a long time ago (roughly 2 years ago) and I stumbled onto a problem. I know how to record a contact form input when it comes to them typing in whatever they have to say (such as their name) but how do I get it so that I collect the input from something such as a radio button/a selection?

<M/> 170 Why so serious? Featured Poster
RikTelner commented: Thank you! +0
<M/> 170 Why so serious? Featured Poster

Hmm, i also see that your site has some awkward coding in some places. Also, try switching your file name to something else and see if the content shows up. Also, clear your cache and all that fun stuff to check if your site is properly running.

<M/> 170 Why so serious? Featured Poster

I am a pretty simple person... all i want is to have some sleep. that is all. With the amount of AP homework i have been getting (not including preperation for test studies), i have had an average of 2-3 hours of sleep per night... So having sleep for 1 day would be a great vacation for me...

<M/> 170 Why so serious? Featured Poster

idk if it is just me but aside from the fact that the site appears to be a mockup of another site, i believe you have an iframe somewhere (based on the 2nd scroll bar that i see)