Jump to content
php.lv forumi

marcho10

Reģistrētie lietotāji
  • Posts

    32
  • Joined

  • Last visited

Posts posted by marcho10

  1. <?php

    Header("Content-type: text/html");

    echo "$first умножить на $second получится ", $first*$second;

    ?>

     

    Nevaru saprast norakstu no graamatas vienalga kļūda!

     

    Notice: Undefined variable: first in c:\easyphp1-8\www\metrum\test1.php on line 3

     

    Notice: Undefined variable: second in c:\easyphp1-8\www\metrum\test1.php on line 3

    умножить на получится

    Notice: Undefined variable: first in c:\easyphp1-8\www\metrum\test1.php on line 3

     

    Notice: Undefined variable: second in c:\easyphp1-8\www\metrum\test1.php on line 3

     

    Kas par lietu?

  2. <HTML>

    <HEAD>

    <TITLE>create db</TITLE>

    </HEAD>

    <BODY>

    <?php

    $host="localhost";

    $user="root";

    $password="marcho100";

    $DBname="metrum";

    $link=mysql_connect ($host,$user,$password);

    mysql_create_db ($DBname,$link)){

    mysql_close ($link);

    ?>

    </BODY>

    </HTML>

     

    un man raksta:

    Parse error: parse error in c:\easyphp1-8\www\test\create_db.php on line 12

     

    Kas par problēmu?

  3. Es samainiiju visur

    print ("Jūsu vārds ir "$_Post[vards]."<br>\n");

    Bet vienalga neiet, tagad raada:

    Parse error: parse error, unexpected T_VARIABLE in C:\EasyPHP 2.0b1\www\project1\HandleForm.php on line 7

    Ko dariit?

  4. Es esmu iesaacejs. Maacos no vienas graamatas un meeginu. Graamataa bija rakstiits viens piemeers.

    Man ir fails form.html ar kodu:

    <HTML>

    <HEAD>

    <TITLE>HTML FORM</TITLE>

    </HEAD>

    <BODY>

    <form action = "HandleForm.php" method=post>

    Vārds:<input type=text name="vards"size=10br><br><br>

    Uzvārds:<input type=text neme="uzvards"size=10br><br><br>

    E-mail: <input type=text name="email" size60br><br><br>

    Komentāri:<textarea name="Komentari" row=50 cols=20></textarea><br>

    <input type=submit name="Submit" values="Submit!">

    </form>

    </BODY>

    </HTML>

     

    Ir otrs fails HandleForm ar kodu:

    <HTML>

    <HEAD>

    <TITLE>Form results</TITLE>

    </HEAD>

    <BODY>

    <?php

    print ("Jūsu vārds ir $vards.<br>\n");

    print ("Jūsu uzvārds ir $uzvards.<br>\n");

    print ("Jūsu E-pasta adrese ir $email.<br>\n");

    print (":<br>\n $Komentari<br>\n");

    ?>

    </BODY>

    </HTML>

    Kaada man probleema. Kad es formaa ievadu datus un piespiezhu pogu submit man paraadaas:

     

    Notice: Undefined variable: vards in C:\EasyPHP 2.0b1\www\project1\HandleForm.php on line 2

    Jūsu vārds ir .

     

    Notice: Undefined variable: uzvards in C:\EasyPHP 2.0b1\www\project1\HandleForm.php on line 3

    Jūsu uzvārds ir .

     

    Notice: Undefined variable: email in C:\EasyPHP 2.0b1\www\project1\HandleForm.php on line 4

    Jūsu E-pasta adrese ir .

     

    Notice: Undefined variable: Komentari in C:\EasyPHP 2.0b1\www\project1\HandleForm.php on line 5

    :

     

    Kas par probleemu?

×
×
  • Create New...