Jump to content

fazlionline

Member
  • Posts

    204
  • Joined

  • Last visited

Posts posted by fazlionline



  1. View Other Records

    Update Your Information

    Full Name:

    Write yo full name with nick name
    ID:

    OLD ID
    Password:

    OLD PASSWARD
    Bate of Birth:

    Date - Month - Year
    Domicile

    The place where you parents lived
    Mobile Numbers:

    You can enter two mobile numbers, separate them with " / " .
    Country:

    The Country you live now
    State/Province/City:

    The State/province/City you live now
    Position Your Job Position
    Organization Name::

    Name of the Organization you work in

    Profession:



    What is your profession, what are you expert in?
    Education Level:

    Your highest education level
    Email:

    The email address you use/check most.





  2. as you solved that problem

    thanks for that

     

    but now same code is not updating another record!

     

    my PHP code is this

     

    <?php
    
    // Make a MySQL Connection
    // Update Multiple fields
    
    mysql_query(" UPDATE schooldb SET
    
    regname= '".$_POST['updname']."', 
    regdob= '".$_POST['upddob']."', 
    regdomi= '".$_POST['upddomi']."', 
    regmob= '".$_POST['updmob']."', 
    regcountry= '".$_POST['updcountry']."', 
    regcity= '".$_POST['updcity']."', 
    regposition= '".$_POST['updposition']."', 
    regorg= '".$_POST['updorg']."', 
    regpro= '".$_POST['updpro']."', 
    regedu= '".$_POST['updedu']."', 
    regemail= '".$_POST['updemail']."', 
    
    WHERE 
    
    regid = '" .$_POST['updid']."' AND regpass = '" .$_POST['updpass']."';");
    
    echo "Data Updated!";
    ?> 

     

    is there anything missing?

    Thanks

  3. If I want the record to be updated when two fields in the form are equal to two fields in the tadabase.

    Is this code right?

     

    mysql_query("

     

    UPDATE example SET name= '".$_POST['xname']."', email = '".$_POST['xemail']. "'

    WHERE

    pass = '" .$_POST['xpass']."' AND location= '" .$_POST['xlocation']."' ;");

     

    Thanks

  4. Hi all

    I have a form to update user information.

    The form has name, email &pass.

    If the user want to update his information, he will type his name, email and password in the form, then he will click the submit button.

    The PHP code will replace his database name and email with the form name and email IF the password in the form is equal to the password in the form.

    This is the code I worte, but not working:

     

     

    <?php
    
    // connect to database.
    
    // Update a record.
    
    mysql_query(" 
    
    UPDATE example SET name= $_POST[name], email =$_POSR[email] 
    
    WHERE
    
    pass==$_POST[pass] ");
    
    ?>

     

     

    Can anyone help me how to write this code?

     

    Note: I want to update this record in MySQL database using PHP Form

  5. hi all

    i did it, with another code

     

    see the red code, i added :

     

    <?php

    // Make a MySQL Connection

     

    // Get all the data from the "example" table

    $result = mysql_query("SELECT * FROM schooldb ORDER BY regname")

    or die(mysql_error());

     

    echo "

     

    echo "

    S

    Name

    DoB

    Domicile

    Phone

    Country

    City

    Position

    Organization

    Profession

    Education

    Email ";

     

     

    $ctr = 1;

     

    // keeps getting the next row until there are no more to get

    while($row = mysql_fetch_array($result))

    {

    echo "

     

    echo "

    " . $ctr . "";

    echo "

    " . $row['regname'] . "";

    echo "

    " . $row['regdob'] . "";

    echo "

    " . $row['regdomi'] . "";

    echo "

    " . $row['regmob'] . "";

    echo "

    " . $row['regcountry'] . "";

    echo "

    " . $row['regcity'] . "";

    echo "

    " . $row['regposition'] . "";

    echo "

    " . $row['regorg'] . "";

    echo "

    " . $row['regpro'] . "";

    echo "

    " . $row['regedu'] . "";

    echo "

    " . $row['regemail'] . "";

     

     

    echo "

    ";

    $ctr++;

    }

    echo "

    ";

    ?>

  6. I have a database of users, they have filled the form.

    Now they want to update their information.

    I want the user should change all of his information, if the user name & pass in the form (is equal to ) user name & pass in the database.

    This code is not working:

     

    <?php
    // Make a MySQL Connection
    
    // Insert a row of information into the table "mytbl"
    mysql_query("UPDATE mytbl SET regname = '$_POST[updname]',
                                    regdob = '$_POST[upddob]',
                                    regdomi = '$_POST[upddomi]',
                                    regmob = '$_POST[updmob]' ,
                                    regcountry =  '$_POST[updcountry]',
                                    regcity =  '$_POST[updcity]',
                                    regposition  '$_POST[updposition]',
                                    regorg =  '$_POST[updorg]',
                                    regpro = '$_POST[updpro]',
                                    regedu =  '$_POST[updedu]',
                                    regemail =  '$_POST[updemail]',
                           WHERE
                                    regid = '$_POST[updemail]' AND regpass = '$_POST[updemail]'");
    
    
    
    echo "Data Updated!";
    ?> 

     

    Thanks

  7. Hi all

    I have a database of some users, but serial number was missing in the output form.

    Now I want to add the serial number, but have problem.

    When I made the database, I made 4 test entries to check if it works or not, when that worked then I deleted those entries.

    Now when I use:

      echo "" . $row['id'] . "";

    It works properly, but it starts form 5 and so on. And I want it to start form 1.

    I also want my database to be ordered by names.

    $result = mysql_query("SELECT * FROM my_table ORDER BY id") 
    or die(mysql_error());  

    Any suggestion!

     

    Thanks

  8. I made a favicon, and placed it on my site, it works perfectly.

     

    As I have many pages, on three different languages, and many sections in each languages. So the data stored in my host is arranged as per different languages, then each related topics are in deferent folders.

     

    If I create a favicon, as I did, then is there any way that all pages should have same favicon, with the help of any code.

     

    It is difficult manually to open each page, go to code, and place that favicon code in

    .

     

    As I have more than 3000 php pages, all in 368 different folders.

    Any suggestion

  9. hello cugopob.vlad

    i tried your code, is too lengthyit and gives error,

     

    Method Not Allowed

    The HTTP verb used to access this page is not allowed.

     

    see it here: http://www.fazlionline.com/school/killer01.html

     

     

    I liked jlhaslip's Script

    hi jlhaslip, will u plz help me just to add one field for email only!!!

     

    or see the form agian:

    http://www.fazlionline.com/school/email01.html

     

     

    Thansk

  10. I made the changes as you told, but it still give error.

    At this time, no email is sent to my inbox.

     

    My new code is:

     

    <?php
    
    if($_POST['button']){
    mail($to, $subject, $message, $headers);
    }
    
    $email=$_POST['email'];
    
    $to      = $_POST['email'];
    $subject = $_POST['name'];
    $message = $_POST['message'];
    $headers = "From: $email" . "\r\n" .
       'Reply-To: webmaster@example.com' . "\r\n" .
       'X-Mailer: PHP/' . phpversion();
    
    ?>

     

    The error I receive is:

     

    Warning: mail() [function.mail]: SMTP server response: 503 Bad sequence of commands. You must specify the recipients of a message before you can send it in E:\inetpub\vhosts\fazlionline.com\httpdocs\school\send_email_01.php on line 4

     

    What is the solution?

     

    check it here: http://www.fazlionline.com/school/send_email_01.php

  11. Dear Thelma

     

    Are you a Philosopher?

     

    Your sentences are like the philosopher, which take time for me to understand. Like:

    What part didn't make any sense?

    This sentence may be so simple to you, but I was unable to get what you mean, as I live in Central Asia and my English is not good as yours.

     

    You may write ( as i got) :

    (what is difficult to you ?)

     

    Do not mind, but if you write clearly what you mean by your reply, it will help me understand sooner.

    In my post number 3 when I asked you, you could also replay with ?YES? or ?NO?.

    If I was right, then ?Yes?, if not, then ?No? and the details/reason!

    I appreciate your good work for www.killersites.com, as you are always the first to replay to my question in this forum, and I am so thankful for that.

     

    I still do not understand what you mean, should I write:

    1. www.killersites.com

    2. killersites [dot] com

    3. Killersites

     

    (This not means that you will not replay to any of my question in the future, I only want to explain, not to hurt you, if you are hurt by me, I apologize for that)

     

    Thanks

    Fazlionline

×
×
  • Create New...