<M/> 170 Why so serious? Featured Poster

I'm sure its right, I followed a few guys on youtube... they did the same exact way as I did...

I believe my demo site is set as a ftp user.

<M/> 170 Why so serious? Featured Poster

Thanks for the resource :)
Problem with the jquery file is that when I open it gives me a massive document (jquery-1.4.2.min.js)... is this supposed to happen?

<M/> 170 Why so serious? Featured Poster

I keep getting un-identefied errors... :(

<M/> 170 Why so serious? Featured Poster

Can you write a snippet of code? I am learning bits and bits of jquery while I learn php/mysql

<M/> 170 Why so serious? Featured Poster

All the info. is correct...

pritaeas, I am not sure what you mean by whitelist but I think GoDaddy allows remote connections...

<M/> 170 Why so serious? Featured Poster

I have a GoDaddy account and I want to connect dreamweaver to the mysql server... but I keep getting errors... no matter what I do... can someone assist me?

I called GoDaddy, they couldn't answer me so they blamed Dreamweaver...

<M/> 170 Why so serious? Featured Poster

But what if I wanted to create it myself? I don't want to have the troubles of a plugin because I want maximum control... so you have any sources but thanks for that fact...

<M/> 170 Why so serious? Featured Poster

Here is my code

<?php
       $name = $_POST['name'];
       $email = $_POST['email'];
       $comment = $_POST['comment'];
       $phone = $_POST['phone'];

            $from = 'From: Form Submission';
            $to = 'email@gmail/yahoo/etc.com';
       $subject = 'Form Has Been Submitted - FRONT PAGE';

       $body = " Form is Submitted by $name\n E-Mail: $email\n Phone: $phone\n Comments:\n $comment";

   if ($_POST['submit']) {
             if (mail ($to, $subject, $body, $from)) {
                    echo '<p>Message Sent Successfully!</p>';
                        } else {
                    echo '<p>Your Message was not submitted -  Please Try again!</p>';
                        }
                }
?>

<?php
//validation
$name = $_POST['name'];
$email = $_POST['email'];


//Filter Name
if(!filter_var($name, FILTER_DEFAULT))
    {
        echo "Name is not valid";
        }

//Filter Email
if(!filter_var($email, FILTER_VALIDATE_EMAIL))
  {
  echo "E-mail is not valid";
  }

//Filter Phone
if(!filter_var($email, FILTER_DEFAULT))
{
    echo "Phone is not valid";
    }

?>
<M/> 170 Why so serious? Featured Poster

saadi, the 2 snippets of code don't work... Shall I post what my code looks like?

<M/> 170 Why so serious? Featured Poster

Can you explain to me what that second line does in email validation?

<M/> 170 Why so serious? Featured Poster

Saadi.. is there a way in not using JQUERY? just php only?? and here is my code:

<?php
       $name = $_POST['name'];
       $email = $_POST['email'];
       $comment = $_POST['comment'];
            $from = 'From: My Contact Form';
            $to = 'me@email.com';
       $subject = 'Hi?';

                $body = "From: $name\n E-Mail: $email\n Comment:\n $comment";

   if ($_POST['submit']) {
             if (mail ($to, $subject, $body, $from)) {
                    echo '<p>Message Sent Successfully!</p>';
                        } else {
                    echo '<p>Try again, please?</p>';
                        }
                }
?>

where would I place the code?

<M/> 170 Why so serious? Featured Poster

Thanks squidge, but can you write a snippet of code so I can see what the code looks like on each one... I'm still new to php, so it's kinda hard to adapt to.

saadi, I am still trying out your solution... I will notify you when I get it sorted out:)

<M/> 170 Why so serious? Featured Poster

Hi guys!
I have worked on some php code on making my contact form work...
I stumbled on a few questions:

  • I can't figure out why the contact form doesn't send me a notification email telling me someone submitted a form.

  • I don't know how to send a user a message through their email saying that we got their form submitted.

  • I can't figure out how to put a message in the same window saying "Thanks for Submitting Form" without putting this on another page.

  • I can't figure out how to make fields required.

  • I can't figure out how to allow user's to only send form once.

  • I can't figure out a solution in putting ways in checking for real emails, so I don't get spammed by users sending fake emails (the email form has to have the @ symbol in order for it to work).

I know I am asking a lot of ridiculous questions... but I really need someone to help me here... I will paste my code here if you need it...

Please update me if you guys don't get my questions

Please respond a.s.a.p!
Thanks!

<M/> 170 Why so serious? Featured Poster

I've seen some premium plugin's for wp for that would fit your solution, but i've got to look into it for you... I will notify you if I find them..

<M/> 170 Why so serious? Featured Poster

It's just some hacker on another computer... don't worry about it...
Normally major companies would customize their emails and they display their links :)

<M/> 170 Why so serious? Featured Poster

I know I'm gonna need it, but I don't want to write too much of jqeury... So you have any possible solutions... source codes? sites? tutorials? anything?

<M/> 170 Why so serious? Featured Poster

Due to the popularity of owning a domain, its becoming impossible to find a domain for your uses... so its rare to find anything 2 lettered...

<M/> 170 Why so serious? Featured Poster

thanks for that info, but I don't want a plugin... I want to do it purely of html5 and css3... and very little JQuery :)

<M/> 170 Why so serious? Featured Poster

I was looking for an image slider, not that kind sorry..

<M/> 170 Why so serious? Featured Poster

Can anyone write a simple code for a slider that fades???? i want to do one just like the one on mbusa.com.... can anyone assist???

Thanks in advanced!

<M/> 170 Why so serious? Featured Poster

Sorry for not updating you, I forgot to come back... but yes it worked but I'm planning on taking things a step further! so thanks for your assistance :)

<M/> 170 Why so serious? Featured Poster

Thanks for the help, I will try it out, and I will update you :)

<M/> 170 Why so serious? Featured Poster

Thank you for that information, the thing is that I want to use less Javascript/JQuery and more of the html5 and css3 features... but I will keep that in mind :)
Hope you got to work on time :)

Thanks!

________
I will update you if it worked or not :)

<M/> 170 Why so serious? Featured Poster

Sure, but remember its only css and html

Here is html

<div id="stylized" class="myform">
<form id="form" name="form" method="post" action="index.html">
<h1>Contact Us</h1>

<label>Name*</label>
<input type="text" name="name" id="name" />

<label> Email*</label>
<input type="text" name="email" id="email" />

<label>Comments
</label>
<input type="text" textarea name="comment" id="comment"></textarea>

<button type="submit">Sign-up</button>
<div class="spacer"></div>

</form>
</div>

Here is css

#stylized {
    position:absolute;
    z-index:1;
    left: 22px;
    top: 8px;
}

body{
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
}
p, h1, form, button{border:0; margin:0; padding:0;}
.spacer{clear:both; height:1px;}
.myform{
margin:0 auto;
width:330px;
padding:14px;
height: 200px;
}
#stylized{
border:solid 1px #5c6063;
background: #EAEAEA;
}
#stylized h1 {
font-size:12px;
margin-bottom:8px;
}
#stylized label{
display:block;
text-align:left;
width:140px;
float:left;
left: 10px;
}
#stylized .small{
color:#666666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:140px;
}
#stylized input{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:200px;
margin:2px 0 20px -65px;
height: 20px;
}
#stylized button{
clear:both;
margin-left:150px;
width:125px;
height:31px;
background:#666666  no-repeat;
text-align:center;
line-height:31px;
color:#FFFFFF;
font-size:11px;
font-weight:bold;
}




.disclaimer {
    color: #CCC;
}
.disclaimer_dark {
    color: #666;
}

I'm not sure if I did everything properly, but all I'm looking forward to is a finished and active form, I know you can help :)

<M/> 170 Why so serious? Featured Poster

Does anyone know how to make the slider on the Mercedes benz USA site? http://www.mbusa.com/mercedes/index?utm_expid=62343809-0

Can anyone show me a tutorial or anything on how to make that slider?

<M/> 170 Why so serious? Featured Poster

I am building a contact form, and I made it out of html and css, but I can't apply php to it in order to make it functional... I wanted it to have the abilities to notify me if someone submits form, the ability to only apply valid information, and etc.

I will place my html and css code if needed... i just need help applying the php part!

<M/> 170 Why so serious? Featured Poster

Welcome :)

<M/> 170 Why so serious? Featured Poster

Use Wordpress, other's would desire you to know coding...

<M/> 170 Why so serious? Featured Poster

USE WORDPRESS!, most recommended tool!

<M/> 170 Why so serious? Featured Poster

Have a template set up (easy to make), that's an easy way to go!

<M/> 170 Why so serious? Featured Poster

I know there are a few tutorials on the web for solving this, I can't give my opinion because I might mis-guide you... but I recommend using a plug-in if you want to customize. Remember, in Wordpress you want less coding so do your best to stay away from the editor. :)
Tell me if this helped

<M/> 170 Why so serious? Featured Poster

I think this link may help :)
Click Here

<M/> 170 Why so serious? Featured Poster

Well, i'm not that successful... do you mind giving me an example? I am a newbie coder, so my skills are weak compared to yours.

<M/> 170 Why so serious? Featured Poster

Ok, lemme try that!

<M/> 170 Why so serious? Featured Poster

Honestly, I think that you should get advice from someone who has taken those courses... but if you want my advice i'd take what tools they use and learn from there (but my advice is an option)... take whatever option you'd like... this is your choice and I hope you the best of luck in becoming a pro app developer :)!

<M/> 170 Why so serious? Featured Poster

Well... by my opinion, it's better to stick with both. Think about it this way, if your good on both you can make your app even popular if it is on both iOS and Android... That's my opinion, I can give you more advice, but if you want to stick in a budget do iOS first, then android.

But this is totally your choice, so I wish you the best of luck on which path you take :)

If you have more questions, ask or research further!:)

<M/> 170 Why so serious? Featured Poster

So I stumbled upon this question and I wanted to figure out how to find the mean, median, mode, highest number, lowest number, how many evens, and how many odds are in each row... I honestly can't figure this out...
I want it to display next to the table I have created, which is the last table... and I want to connect the new colums to the original table... do you see what I mean?

Here is my code:

<p>
  <?php
$x=0;
$min=900;
$max=2000;
// initialize array of random values
$random_array = array();
// initialize temporary array for sorting
$temp_array = array();
// start html table for random values
echo "<table border=\"1\">";
// create $random_array with random numbers, display html table rows and
// store each value in onedimensional $temp_array for sorting
for($row=1;$row<=10; $row++){
    echo "<tr>\n";
    for($col=1;$col<=10; $col++) {
        $x=rand($min,$max);
        $random_array[$row][$col] = $x;
        echo"<td>$x</td>\n"; 
        // add value to the $temp_array
        $temp_array[] = $x;
    }
    echo "</tr>";
}
// end the html table
echo "</table>";
?>
</p>
<p>
  <?php
// sort the $temp_array (sort works on onedimensional arrays)
sort($temp_array);
// start a table for sorted values
echo "<table border=\"1\">";
// initialize counter that will be the $temp_array's key
$key = 0;
// display html table rows of sorted values
for($row=1;$row<=10; $row++){
    echo "<tr>\n";
    for($col=1;$col<=10; $col++) {
        echo"<td>{$temp_array[$key]}</td>\n";
        // increase the key
        $key++; 
    }
    echo "</tr>";
}
// end the html table of sorted values
echo "</table>";
?>
</p>
<p>
  <?php
// sort the $temp_array (sort works on onedimensional arrays)
rsort($temp_array); …
<M/> 170 Why so serious? Featured Poster

Since your far from a guru, might as well call you the Da Vinci of the web :) or the broj1 of the web :)

I think everything you post is a solution so I will definitly triple thumbs up!

<M/> 170 Why so serious? Featured Poster

Wow... I just praise you... you are a complete genius... do you mind if I call you a guru????

Thank you for helping, you don't realize how much you've helped me!

Thanks and best regards!
Sedique

<M/> 170 Why so serious? Featured Poster

I am trying to use a modulo to make all even numbers replaced with a star and all odds replaced with a percent sign... this is my code:

<?php
$x=0;
$min=900;
$max=2000;
// initialize array of random values
$random_array = array();
// initialize temporary array for sorting
$temp_array = array();
// start html table for random values
echo "<table border=\"1\">";
// create $random_array with random numbers, display html table rows and
// store each value in onedimensional $temp_array for sorting
for($row=1;$row<=20; $row++){
    echo "<tr>\n";
    for($col=1;$col<=20; $col++) {
        $x=rand($min,$max);
        $random_array[$row][$col] = $x;
        echo"<td>$x</td>\n"; 
        // add value to the $temp_array
        $temp_array[] = $x;
    }
    echo "</tr>";
}
// end the html table
echo "</table>";

// sort the $temp_array (sort works on onedimensional arrays)
sort($temp_array);
// start a table for sorted values
echo "<table border=\"1\">";
// initialize counter that will be the $temp_array's key
$key = 0;
// display html table rows of sorted values
for($row=1;$row<=20; $row++){
    echo "<tr>\n";
    for($col=1;$col<=20; $col++) {
        echo"<td>{$temp_array[$key]}</td>\n";
        // increase the key
        $key++; 
    }
    echo "</tr>";
}
// end the html table of sorted values
echo "</table>";


// sort the $temp_array (sort works on onedimensional arrays)
rsort($temp_array);
// start a table for sorted values
echo "<table border=\"1\">";
// initialize counter that will be the $temp_array's key
$key = 0;
// display html table rows of sorted values
for($row=1;$row<=20; $row++){
    echo "<tr>\n";
    for($col=1;$col<=20; $col++) {
        echo"<td>{$temp_array[$key]}</td>\n";
        // increase the key
        $key++; 
    }
    echo "</tr>";
}
// end the html table of sorted values
echo "</table>";
?>

I need …

<M/> 170 Why so serious? Featured Poster

Oh a got another question... how do I make every even/odd number have for example: all evens are blue... and odds are red?

Do you know if that is possible?

And how come the table's won't separate when I insert break tags?

I know you helped me truly a lot but do you mind answering this last question????

Thank you for all your help!
Sedique

<M/> 170 Why so serious? Featured Poster

You don't realize how much you've helped me! You solved my biggest problem and I'd like to thank you for that! Those errors I made are stupidity of mine I guess and I think I was experimenting...

But I came up with a question, is there other ways in sorting a loop or maybe a better way and a way I shouldn't do it?

Other than that question, you really helped me through this one!
I truly thank you and wish you the best of luck in computer programming! Hopefully, I'll be as good as you in maybe about a 2-3 years!

Thanks!
Sedique

<M/> 170 Why so serious? Featured Poster

Dear DANIWEB community members,

I have a question about sorting a label, and I've tried so hard in figureing it out but I realized that I am doing something wrong but not sure what... What I am doing is sorting the numbers, which is created by the loop, that populate the array...

The first table shows all the numbers in a random order

The second table displays the numbers in order and the numbers are the ones that come from table 1.

Anyone have a clue on how to do it?

My code may have errors but can someone please help me with this

<?php
$red = array();
    $x=0;
    $min=900;
    $max=2000;
    echo "<table border=\"1\">";
    for($row=1;$row<=20; $row++){
                    echo "<tr>\n";


                      for($col=1;$col<=20; $col++){
                          $x=rand($min,$max);
                                   $red[$row][$col] = $x;
                                   $blue[$row][$col]=$table[$row][$col];
                                     echo"<td>$x</td>\n"; 
                                                     }
                       echo "</tr>";
                                  }

sort($red);
            foreach ($red as $key=> $value) {
                echo $value. "<br>\n";           
    echo "</table>"; 
echo "<table border=\"1\">";
    $red[$row][$col] = $x;
    echo"<td>$y</td>\n";
    }
echo "</tr>";
echo "</table>"; 
?>



<?php
sort($red);
foreach ($red as $key => $value) {
echo $value. "<br>\n";
}
?>

Please take your time and help me! If this is unclear please tell me so I can be clearer!
Thanks!,
Sedique

<M/> 170 Why so serious? Featured Poster

Well, I am trying to take a table that is randomly sorted, and I wanted to put it in order (biggest to smallest)... apparently, whatever I do, it doesn't work... And I filled the array up with a loop... (maybe my loop is designed wrong?)

That's what I am trying to do!
Thanks!

<M/> 170 Why so serious? Featured Poster

Thanks for your quice response!

Apparently, I do have knowledge on how to do arrays... but the link you gave me wasn't very helpful... do you have any other solutions?

Thanks!

<M/> 170 Why so serious? Featured Poster

PLEASE HELP!!!
I have a 2 dim array (5x5) - I want to sort random integers that are contained within the array (from smallest to largest).... When I use asort() function I get the orginal table back... Also, the bubble sort didn't work... it only sorts the rows indpendently....

Reference:/// Can someone PLEASE Help and point out what is wrong.... feel free to write back a few lines of code that may work....

Thanks!

<?php
  // Assign values ....  

    $table = array();
    $x=0;
    $min=60;
    $max=101;

    echo "<table border=\"1\">";
    for($row=1;$row<=4; $row++){

                    echo "<tr>\n";

                      for($col=1;$col<=5; $col++){
                          $x=rand($min,$max);
                                   $table[$row][$col] = $x;

                                     echo"<td>$x</td>\n"; 
                                                     }
                       echo "</tr>";
                                  }
    echo "</table>";     
asort($table);

//Try her to re-display the table using BUBBLE SORT each row gets sorted but not the entire table...  

echo "<table border=\"1\">"; 
for($row=1;$row<=5; $row++){

                    echo "<tr>\n";

                      for($col=1;$col<=5; $col++){

                          for($j=1;$j<=5;$j++){

                          if ($table[$row][$col]>$table[$row][$col+1]){

                              $temp=$table[$row][$col];
                              $table[$row][$col]=$table[$row][$col+1];
                              $table[$row][$col+1]=$temp;
                          }
                              }

                                                     }
                       echo "</tr>";
                                  }
    echo "</table>";     

// 
asort($table);  // The asort() does not affect the table - it gives back the same one....

echo "<table border=\"1\">"; 
for($row=1;$row<=4; $row++){

                    echo "<tr>\n";




                      for($col=1;$col<=5; $col++){

                                  $y= $table[$row][$col];

                                     echo"<td>$y</td>\n"; 
                                                     }
                       echo "</tr>";
                                  }
    echo "</table>";     
    ?>


  :)
<M/> 170 Why so serious? Featured Poster

Can you write me a couple of lines on how to do it? Apparently, I have messed up numerous times today in making this work... do you mind helping?

Thanks again!

<M/> 170 Why so serious? Featured Poster

No, this isn't for a class of any sort... this is just me trying to figure out different ways of manipulating arrays...

Apparently I want to use a loop to sort these... you know how to set this up?

Thanks for the quick response!

<M/> 170 Why so serious? Featured Poster

How do I sort this loop? I can't sort it because I just began learning PHP, so I don't know as much as most of you users... Can anyone help me?

<?php
    $red = array();
    $x=0;
    $min=500;
    $max=2000;

    echo "<table border=\"1\">";
    for($row=1;$row<=20; $row++){

                    echo "<tr>\n";
                    //Need table ONE to have 20 by 20 rows & columns 
                    //Need the table to contain numbers between 900 - 2000 (Randomly)
                    //Table two will take table ONE and sorts it from Smallest to Biggest
                    //Table three will take table ONE and sorts it from Biggest to Smallest
                    //Table 4 will only show a (*) net to the Odd Numbers and (#) next to the Even Numbers 

                      for($col=1;$col<=20; $col++){
                          $x=rand($min,$max);
                                   $red[$row][$col] = $x;
                                   $blue[$row][$col]=$table[$row][$col];

                                     echo"<td>$x</td>\n"; 
                                                     }
                       echo "</tr>";
                                  }
    echo "</table>"; 




$blue= array();
echo "<table border=\"1\">";

for($row=1;$row<=20; $row++){
    echo "<tr>\n";

for($col=1;$col<=20;$col++){
    $blue[$row][$col] = $y;
    echo"<td>$y</td>\n";
    }
echo "</tr>";
}
echo "</table>"; 
?>

Basically what is in the comments inside the code is what I need to achieve... I unfortunately can't, so please help me!!!