<M/> 170 Why so serious? Featured Poster

Lets get this straight... every forum has its own pros and cons.......

<M/> 170 Why so serious? Featured Poster

Well... i just started high school so we got some similarity here... but anyways... I think both are good but I have a feeling that Halo 4 could be better... I don't play video games unfortuanetly but from what I see... Halo could be better... (I think ACIII, Watchdogs, Hitman are pretty cool)

<M/> 170 Why so serious? Featured Poster

I don't know if it is just me but does the footer look different by any chance? I like it but... I wonder if you guys have noticed... or it could just be me....

<M/> 170 Why so serious? Featured Poster

Well if you have good service, you'll have referals....
Remember SEO, SMO, Ads, Affiliation, Blogging, Well-Designed Page/Site, Good Services/good deals, top Google search, etc... So this is some things to consider when gaining reputation... a lot of things are self explanatory so be sure your site is fully functional!

<M/> 170 Why so serious? Featured Poster

Don't worry... everyone makes mistakes no matter how experienced you are... :)

<M/> 170 Why so serious? Featured Poster

my vote for mickey mouse!

<M/> 170 Why so serious? Featured Poster

Welcome.... your going to learn plenty here :)

<M/> 170 Why so serious? Featured Poster

Obama dominated romney... i bet his wife if freaking out more than him... (she is probably beating him, that could be why he is upset about the debate though)....

<M/> 170 Why so serious? Featured Poster

Okay, I applied some styling... but unfortunately I can't see some of them... for example.... I wanted to make the header an orange-yellow color... it doesn't work.... Can you guys tell me why some of my stylings do not work/do anything...?

Here is my code:

<style> table{width:100%; border-collapse:collapse; border:1px solid grey; background: #fafafa; font-size: 12px;} td {font-size: 12px; border: 1px solid grey;border-collapse:collapse; text-align: left; width: 150px; padding-top: 5px; padding-left: 5px;} th {background: #ffb300; text-align: left; padding-top: 5px; padding-left: 5px; font-size: 12px;} tr:hover {color: red; font-size: 12px;} .col1 {background: #fafafa;} .col2  {background: none;} .dark {background: #fafafa;} .light {background: #fff;}</style>
<body>

<?php
echo "<html>\n<body>\n\t<table style=''>\n\n";
$f = fopen("CSVFILE.csv", "r"); //Safe
$trcount = 0; //start the row count as 0 //start from the column heading
while (($line = fgetcsv($f)) !== false) {
        $trclass = ''; if ($trcount%2==0) { $trclass=' class="dark"'; } //default to nothing, but if it's even apply a class
        echo "\t\t<tr".$trclass.">\n"; //same as before, but now this also has the variable $class to setup a class if needed
        $tdcount = 0; //reset to 0 for each inner loop
        foreach ($line as $cell) {
                $tdclass = ''; if ($tdcount%2==0) { $tdclass=' class="light"'; } //default to nothing, but if it's even apply a class
                echo "\t\t\t<td ".$tdclass."style='padding:.4em;'>" . htmlspecialchars($cell) . "</td>"; //same as before, but now this also has the variable $class to setup a class if needed
                $tdcount++; //go up one each loop
        }
        echo "\r</tr>\n";
        $trcount++; //go up one each loop
}
fclose($f);
echo "\n\t</table>\n</body>\n</html>";
?>
<M/> 170 Why so serious? Featured Poster

He probably meant to post this as a reply in another article...

<M/> 170 Why so serious? Featured Poster

If I can vote... I will vote with Ancient Dragon

Ezzaral commented: Hopefully you grow up to be more thoughtful. +0
<M/> 170 Why so serious? Featured Poster

I wish I can vote...

<M/> 170 Why so serious? Featured Poster

I also heard that Romney isn't very compatible with the "gay" citizens... so that isn't going to help him... and he possibly favors the 1% of america (the rich guys like Gates, Zuckerberg, Ellison, etc.)

I personally believe that this thread might get a little too far beyond political... so I'm going to stop pointing facts out... don't want everyone to go berserk against me or anyone else that'll participate...

<M/> 170 Why so serious? Featured Poster

Obama will win by my opinion... i personally hate getting involved politics and I believe that both candidates are just full of themselves... Obama didn't achieve very much yet he won in 2008 because McCain is stupid and Romney isn't clever himself... all his numbers that he uses in debates are all false, and worst part is that he is most likely going to set war with the Muslim countries/people... and me being Muslim... that is not going to be pretty...

Both candidates stink... but my opinion shouldn't matter (I just gave a couple out of the many i have) because I just started High School so my vote won't matter for another few years...

sigh
I guess my vote (atm) is undecided... unless I flip a coin :) I wonder what everyone elses defense would be toward their favorite candidates :)....

...if only we had another Clinton...

<M/> 170 Why so serious? Featured Poster

I don't see why they'd sue for that much because of round corners... why not sue other companies for using their touch screen idea and so on... This shows apple has power... but the case wasn't very meaningful.

<M/> 170 Why so serious? Featured Poster

Popularity, referals, service, your own site that features many things... and so on...

<M/> 170 Why so serious? Featured Poster

Be more clear... are you trying to figure out how to format your site so it'd look nice or am I wrong?

<M/> 170 Why so serious? Featured Poster

?????
What was the point of this thread?

<M/> 170 Why so serious? Featured Poster

And also... this maybe a dumb question... but how do you adjust the widths of each individual columns... can't figure it out...

<M/> 170 Why so serious? Featured Poster

Oh wow thanks for you advice and resource... I have a quick question... when I run this... how come an extra line appears? Do you know what caused it? Maybe an extra "\n" was added?

<M/> 170 Why so serious? Featured Poster

I have a table that collects data from web inputs and stores them on an html page... the question how do i style this table... I am not sure how to give it borders, style columns (column 1 is red, 2 is blue, 3 is red, so on), or color the headers... i think i am just lost in my code, but can someone help me?

My code:

<?php
echo "<html>\n<body>\n\t<table style=''>\n\n";
$f = fopen("MYCSVFILE.csv", "r"); //Safe
$trcount = 0; //start the row count as 0 //start from the column heading
while (($line = fgetcsv($f)) !== false) {
        $trclass = ''; if ($trcount%2==0) { $trclass=' class="dark"'; } //default to nothing, but if it's even apply a class
        echo "\t\t<tr".$trclass.">\n"; //same as before, but now this also has the variable $class to setup a class if needed
        $tdcount = 0; //reset to 0 for each inner loop
        foreach ($line as $cell) {
                $tdclass = ''; if ($tdcount%2==0) { $tdclass=' class="dark"'; } //default to nothing, but if it's even apply a class
                echo "\t\t\t<td ".$tdclass."style='padding:.4em;'>" . htmlspecialchars($cell) . "</td>"; //same as before, but now this also has the variable $class to setup a class if needed
                $tdcount++; //go up one each loop
        }
        echo "\r</tr>\n";
        $trcount++; //go up one each loop
}
fclose($f);
echo "\n\t</table>\n</body>\n</html>";
?>
<M/> 170 Why so serious? Featured Poster

Have lots of traffic... Learn about SEO, SMO, how to do ads, plenty of content, clean codes, and all that other good stuff...

<M/> 170 Why so serious? Featured Poster

How come you duplicated this post....

<M/> 170 Why so serious? Featured Poster

I had this... but this could be what you mean by having a 0...

$tdcount = 0;

This is just a variable... but it may not mean much...

<M/> 170 Why so serious? Featured Poster

I know there are many online tutorials that you can search for on google... i think i found one on one of the envato sites and another site that I forgot...

<M/> 170 Why so serious? Featured Poster

*this...

I spelled "this" wrong...

<M/> 170 Why so serious? Featured Poster

Well... I got it to work but when I placed numbering on it... it counted oddly... It counted: 1 2 4 6 9 12 15 and so on... I am going to investigate this and come back to zthis thread...

<M/> 170 Why so serious? Featured Poster

Figured it out by using this:

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

I'm sorry, I understand that I tend to forget to hit the mark solved button... I will make a moment to add a few mark solved articles... but some of those are still open and need answering...

So, through that link... i should use this?:

<?php
$row = 1;
if (($handle = fopen("test.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $num = count($data);
        echo "<p> $num fields in line $row: <br /></p>\n";
        $row++;
        for ($c=0; $c < $num; $c++) {
            echo $data[$c] . "<br />\n";
        }
    }
    fclose($handle);
}
?>

Thanks for your response

<M/> 170 Why so serious? Featured Poster

How do I display whatever that gets submitted in a CSV File on an HTML Web Page by pulling it with php... I am kind of lost....?

<M/> 170 Why so serious? Featured Poster

Exactly... except we'll make it YOLOSDMWSEL!

(You only live once so don't mess with someone else's life)

... pretty good acronym... but kind of random.... :/

<M/> 170 Why so serious? Featured Poster

How do I generate numbers in php that display (for example) Lead Number...

To picture this...
It'look like this (phone numbers are random):

Lead #       Name         Phone
1            Bob          911
2            Jack         119
3            Joey         191
4            Ashley       9110
5            Michael      0119

So how do I create that column on the left that auto numbers each inquiry?

Thanks!

<M/> 170 Why so serious? Featured Poster

Why not use x-code (made by Apple)... a good knowledge of Java will give you an advantage....

<M/> 170 Why so serious? Featured Poster

Hmmm... are we allowed to use acronyms? Like that ridiculous acronym considered as "YOLO"....

<M/> 170 Why so serious? Featured Poster

you can use:

  • Reason
  • Civilize
  • Settle
  • Respect
  • Live
    Those are a few....

Sorry if i used one's that were already mentioned...

<M/> 170 Why so serious? Featured Poster

quick question... how is the second file being called...?
is it because of this?:

 $csv = new File_CSV_DataSource;
<M/> 170 Why so serious? Featured Poster

I am sorry if it wasn't useful, but that's all i had at the moment... I didn't know what was next but my goal is clear though... I am going to examine the snippets you sent me, and i am going to get back to you as soon as possible...

(sorry if i respond too slow... i have school work, and other extra curricular activities to work on at the same time)

<M/> 170 Why so serious? Featured Poster

I am sorry if i am misreading this (I am kind of sore and tired at the moment) but are you trying to use php to collect data from your html and have it sent to a csv or an email?

<M/> 170 Why so serious? Featured Poster

Here is the snippet that is responsible:

$csvData = $today . "," . $first_name . "," . $email . "," . $comment . "\n";
$fp = fopen("results.csv", "a" );
if($fp){
    fwrite($fp, $csvData);
    fclose($fp);
    }


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

so by using this?:

def csv(file)
  File.open(file) do|f|
    columns = f.readline.chomp.split(',')

    table = []
    until f.eof?
      row = f.readline.chomp.split(',')
      row = columns.zip(row).flatten
      table << Hash[*row]
    end

    return columns, table
  end
end

but how would i do this with php because I want the header to display on top with all entries display right under it?

<M/> 170 Why so serious? Featured Poster

how do i make the first form entry that gets sent to the csv go under column heading...?

(i.e.)
I have headers that say Name, Age, weight... and the user submits a form with the following saying Bob, 72, 291... then the data gets sent to the csv... I want all of the data to go under those headers but unfortunately it goes on the same line....

How do i fix that so that it'll display its results under the headers!

WILL POST MY CODE IF NEEDED!

<M/> 170 Why so serious? Featured Poster

That is great :)

<M/> 170 Why so serious? Featured Poster

Wow, I came back from school today... and there were casualities... man CNN is way off -_-
STAY SAFE NY!

<M/> 170 Why so serious? Featured Poster

I am sure that the NY people will be fine, I mean its only a level 1 right... or is it called categories... whatever it is, the NY people aren't going to suffer very much (unless they stress over poweroutages and lots of water or maybe if they don't have a home).
To wrap things up... EVERYONE IS GOING TO MAKE IT THROUGH SAFELY!

<M/> 170 Why so serious? Featured Poster

It didn't do anything unfortunately, can you point out another solution?

<M/> 170 Why so serious? Featured Poster

hmm... I may have it SMTP working... can you go over the installation of it, I mean I could use my form to send emails to me and the user but that probably doesn't have to do with what SMTP does...

<M/> 170 Why so serious? Featured Poster

ok... so what if i have (for example) gmail? will that work?

<M/> 170 Why so serious? Featured Poster

Can you explain to me how this works? How does this send the text? And thanks for the link :)

<M/> 170 Why so serious? Featured Poster

Oh... now i understand what your doing... Great job in solving it!

<M/> 170 Why so serious? Featured Poster

Hi, I wrote a php form and when I look at the confirmation email.... 2 things happen.

  1. My logo dipslays as a link... I want it to be an image...
  2. All the html tags display with the content that is meant to show... I don't want to see the tags, I want to see the content/message...

So how do I fix these 2?

here is the code that is responsible for all of this...

<?php
$sendto = $_POST['email']; // this is the email address collected form the form 
$subject = "email confirmation"; // Subject 
$message_client = "We are confirming your inquery...";
$header = "From: myemail@gmail.com\r\n"; 
$header .= "Reply-to: myemail@gmail.com\r\n"; 

   $v2 = "
<html> 
  <body> 
     <img src= 'logo.png' />
     <h3>Hello $first_name, your form has been submitted! We will review it and get back to you as soon as possible!</h3>
  </body> 
</html> ";
$message_client = $v2; 
   //end of message 
    $headers  = "From: $from\r\n"; 
    $headers .= "Content-type: text/html\r\n"; 

mail($sendto, $subject, $message_client, $header);  
?>