Jump to content

HAN!

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Posts posted by HAN!

  1. i know nothing well happen byitself

    i have a login page using session and im testing it there,

    also with restarting the server nothing happened,

    isn't there any way to do this with a function inside the script???

  2. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\wamp\www\hani\login.php:15) in C:\Program Files\wamp\www\hani\login.php on line 16

     

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\wamp\www\hani\login.php:15) in C:\Program Files\wamp\www\hani\login.php on line 16

     

     

    can you explain this error to me, thanx.

  3. hi, im new at PHP but im a fast learner, really, do im looking for a tutorial to shoe me how to make a simple log in page where it confirms its username and password from a table in a database, then when permitted to login it goes to a page where it outputs all the registered users i have in another table, in this page i want to set every user as i want either ordinary user or administrator where only administrators have the permission to login in the login page, well i made a code for this but its not working as i hope, i told i need to use session function which i dont know, so if u can help me with any tutorial ill appreciate it, and  if u want to see my code ill post it, maybe u can understand more about what i want, thanks

  4. im using a value of input box of a form in a php array, how i can do this?

    <?PHP
    include"connection.php";
    $query="SELECT * FROM registration";
    $result=mysql_query($query);
    $num=mysql_num_rows($result);
    
    
    for($i=0;$i<$num;$i++)
    {
    if($_POST['type'][$i]=='a') //this is where i get it from the form: type.
    {
    $first=mysql_result($result,$i,"First Name");
    
    $query1="INSERT INTO administrator  VALUES ('','$first')";
    mysql_query($query1);
    }
    }
    

     

     

  5. i really dont know what is the use of this forum, i have posted my simple question from half an hour and i didnt get any answer yet, well i dont understand how this is a help forum.

    i just want to know how to use arrays in forms.

  6. i want to use $_POST in while loop,

    for example like:

    $i++;
    while($i<$num)
    {
    $first=mysql_result($result,$i,"First Name");
    $copy=$_POST['usertype'];
    }
    

    so how i can put the $i in $_post like i did in mysql_result.

    thanks for ur help.

     

  7. it just seem that the variables are not transferring from php into javascript, so can u take a look and see if i have somthing missing thank u;

    <?PHP 
    $user='hani';
    $pass='annd';
    ?>
    <script language="JavaScript"> 
    <!-- 
    function validate(form) {
    var u=<?PHP echo '$user'; ?>
    var p=<?PHP echo '$pass'; ?>
    
    
    if (form.username.value!=u)
    )
    {
    alert("Please enter the correct username");
    form.username.focus();
    return false;
    }
    if(form.password.value!=p)
    {
    alert("Please enter the correct password");
    form.password.focus();
    return false;
    }
    }
    //--> 
    </script>
    </head>
    

  8. well thanks for these notes but i tried them and nothing worked can u take a look at my code to see if im missing somthing plz, thanks

    <?PHP 
    $user='hani';
    $pass='annd';
    ?>
    <script language="JavaScript"> 
    <!-- 
    function validate(form) {
    
    var u = "<?php echo str_replace("\"", "\\\"", $user);?>";
    var p = "<?php echo str_replace("\"", "\\\"", $pass);?>";
    
    if (form.username.value!=u)
    )
    {
    alert("Please enter the correct username");
    form.username.focus();
    return false;
    }
    if(form.password.value!=p)
    {
    alert("Please enter the correct password");
    form.password.focus();
    return false;
    }
    }
    //--> 
    </script>
    </head>
    

  9. thanks for the tip there is some improvement but still im getting this error

     

    Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 <hani_alyassir@hotmail.com>... Relaying denied. IP name lookup failed [212.28.253.30] in C:\Program Files\wamp\www\hani\insert.php on line 62

     

    well do i have to change somthing to make it work?

     

  10. here is the code im using:

    <form name="insert" action="insert.php" method="post">
    <table>
    <tr><td>First Name:</td><td><input type="text" name="first" /></td></tr>
    <tr><td>Midle Name:</td><td><input type="text" name="middle"  /></td></tr>
    <tr><td>Familly Name:</td><td><input type="text" name="family" /></td></tr>
    <tr><td>Adress:</td><td><input type="text" name="adress" /></td></tr>
    <tr><td>Describe yourself:</td><td><textarea name="description"></textarea></td></tr>
    <tr><td>E-mail:</td><td><input type="text" name="Email"  size="26" />
    <input type="button" onclick="CheckEmail()></td></tr>
    <script language="javascript">
    function CheckEmail() {
    email = document.insert.Email.value
    AtPos = email.indexOf("@")
    StopPos = email.lastIndexOf(".")
    Message = ""
    
    if (email == "") {
    Message = "Not a valid Email address" + "\n"
    }
    
    if (AtPos == -1 || StopPos == -1) {
    Message = "Not a valid email address"
    }
    
    if (StopPos < AtPos) {
    Message = "Not a valid email address"
    }
    
    if (StopPos - AtPos == 1) {
    Message = "Not a valid email address"
    } 
    return message
    </script>
    <tr><td><input type="submit" /></td></tr>
    </table>
    
    </form>
    

    i will appreciate any comments.

×
×
  • 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.