Web Analytics Made Easy -
StatCounter Error will display but echo will not.... help - CodingForum

Announcement

Collapse
No announcement yet.

Error will display but echo will not.... help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error will display but echo will not.... help

    In my php, the error will display in the html, but echo will not:

    Code:
    if($_SERVER["REQUEST_METHOD"] == "POST"){
     . . .
    
    if (empty($error) && $_POST['field'] == etc... {
    
    echo "Hello";
    $error = "Hello";
    
    . . .
    etc.
    Any ideas how to get echo to display?



  • #2
    How do you know it’s the error that is displaying and not the echo? Seeing only this code, $error isn’t doing anything except being assigned a value. What’s displayed is probably the echo.
    Stop solving problems you don’t yet have!

    Comment


    • #3
      Thanks for your reply.
      My bad example. I should have shown this:

      Code:
      echo "Hello";
      $error = "Hello There";​

      Comment


      • #4
        As noted before, you're just assigned a value to a variable, nobody's going to be able to help you without seeing the rest of the code.

        Comment


        • #5
          Code:
          $error = "Hello There";​
          echo $error;
          NO Limits!!
          ------------------------------------------------------------

          Comment

          Working...
          X