Jump to content

papaface

Members
  • Posts

    1,437
  • Joined

  • Last visited

    Never

Posts posted by papaface

  1. should be:
    [code]<?php
    $name = "Wata"
    $percent = 4
    if ($percent*4 >= 70) {
    echo " {$name}, You are a first class student.";
    }
    else {
    echo "You are not a first class student.";
    }
    ?>[/code]
    You forgot the ()'s and the } on the last else statement.
    EDIT: ^^ posted at the same time with a slightly different peice of code.
  2. Something like this should do it:
    [code]
    // message
    if ( !empty( $dfcontact["field"]["message"]["display"] ) ) {
    echo "<tr>\n";
    echo "<td colspan=\"2\" valign=\"top\"><span>Message:</span><br /><textarea name=\"message\" class=\"inputbox\" cols=\"40\" rows=\"5\">" . ( !empty(

    $_REQUEST["message"] ) ? htmlentities( stripslashes( $_REQUEST["message"] ) ) : "" ) . "</textarea>" . ( !empty(

    $dfcontact["field"]["message"]["duty"] ) ? "*" : "") . "</td>\n";
    echo "</tr>\n";
    }
    [/code]
  3. You would put the form in php:
    [code]
    <?php
    echo "<form action=\"". $_SERVER["PHP_SELF"] ."\" method=\"post\" enctype=\"multipart/form-data\">
    <input type=\"text\" name=\"username\" value=\"".$variable."\">
    <input name=\"submit\" type=\"submit\" />
    </form>";
    ?>
    [/code]

    Where $variable, would be the place you would want your user data to show.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.