Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

second letter of a text field

$
0
0

 I know the problem is here

I cant understand what to put in there to get the value of the second character when something is typed into the text field

also how could I acces the value of $str in my print statement?

Please and thank you ..

echo substr($str, 3,-1); 

f (filter_has_var(INPUT_POST, "color")) {
  
  //work with the form
      		$color = filter_input(INPUT_POST, "color");
      		$str = filter_input(INPUT_POST, "color"); 
echo substr($str, 3,-1);

      		  print"<h2>
Your word was $color  </h2>";

Viewing all articles
Browse latest Browse all 13200

Trending Articles