Professional Web Applications Themes

teach me, please! - PHP Development

I'm a begginer using IIS(win2000server)+PHP+MySQL, I make very simple codes, one html and three php files communiace.html connect.php read.php write.php and I pass the variables within codes by form with "method=post" . when I connect my server, [url]http://localhost/communicate.html[/url] and give any values to variables. Error messages apear! "Notice: Undefined variable: name in E:03DATA\webtxt\exercise\쓰기.php on line 14" why this message apears ! please tell me the cause!...

  1. #1

    Default teach me, please!

    I'm a begginer
    using IIS(win2000server)+PHP+MySQL, I make very simple codes, one html and
    three php files

    communiace.html
    connect.php
    read.php
    write.php

    and I pass the variables within codes by form with "method=post" .

    when I connect my server, [url]http://localhost/communicate.html[/url] and give any
    values to variables.
    Error messages apear!
    "Notice: Undefined variable: name in E:\2003DATA\webtxt\exercise\쓰기.php on
    line 14"

    why this message apears !

    please tell me the cause!


    최선호 Guest

  2. #2

    Default Re: teach me, please!

    > "Notice: Undefined variable: name in
    > E:\2003DATA\webtxt\exercise\쓰기.php on line 14"
    This means that in your code you were using a variable called name (on line
    14 of your code) which does not exist, e.g.:

    if ($name) // first time that $name appears!
    {
    // do something with $name
    }
    else
    {
    // Initialize the variable $name with some value
    $name = "Some value";
    }

    Here, the if-line should trigger the "Undefined variable" notice. This does
    not necessarily mean that there is something wrong. It is just a "reminder".
    You can deliberately use an undefined variable, for instance when you test
    if it exists or not. But it is always a good idea to assign a value to each
    variable explicitly before using it in your code. For example, you could put
    the line

    $name=NULL;

    before the above if-line. The reason is that some evil hacker could easily
    send a variable $name with a value of his own choice to your script. See the
    PHP doc for details (security section).

    Greetings, Thomas



    Thomas Mlynarczyk Guest

Similar Threads

  1. Teach Me Javascript
    By ark Templer webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 7
    Last Post: January 8th, 02:32 PM
  2. can someone teach me how to use dreamweaver plEASE!!!!
    By Sam Poikail in forum Macromedia Dreamweaver
    Replies: 3
    Last Post: July 20th, 02:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139