Results 1 to 7 of 7

Thread: php

  1. #1
    ahmad_IT is offline Senior Member+
    Last Online
    10th July 2011 @ 10:52 PM
    Join Date
    05 Apr 2009
    Posts
    36
    Threads
    8
    Credits
    0
    Thanked
    0

    Default php



    to all the experts of www.itdunya.com....

    i need to store data from multiple checkboxes into database using php...

    how to do.....

    i am using wampserver ...

    thanks

  2. #2
    xauyala's Avatar
    xauyala is offline Senior Member+
    Last Online
    28th December 2012 @ 04:25 PM
    Join Date
    13 Feb 2009
    Posts
    501
    Threads
    31
    Credits
    1,080
    Thanked
    45

    Default

    کیا آپ اندازے سے دیا ہوا کوئی بے تکا جواب چاہتے ہیں؟
    اگر نہیں ، تو کچھ تفصیلات دیجئے آپکا سوال واضح نہیں ہے۔ مثلا" کیا یہ آپکا کوئی کمپوٹر پروجیکٹ ہے یا آپ یہ کام کا کسی آن لائین ویب سائیٹ پر کررہے ہیں۔ پی ایچ پی کو کونسا ورژن انسٹال ہے۔ اگر ویب سائیٹ ہے تو اسکا یوآرایل بتایئے۔ ڈیٹا بیس کی انفارمیشن دیجئے۔ وغیرہ وغیرہ۔

  3. #3
    ahmad_IT is offline Senior Member+
    Last Online
    10th July 2011 @ 10:52 PM
    Join Date
    05 Apr 2009
    Posts
    36
    Threads
    8
    Credits
    0
    Thanked
    0

    Default php



    ji bhai jan......these are the details....which i think are enough to understand.

    i am using php5 , mysql version 5....working in dreamweaver 8...

    and i have started working on a personal project to do ....for my practice on local server on my computer...

    this is the code (need modification) of the form which i want to store the data:

    <html>
    <head>
    <title>Personal INFO</title>
    </head>
    <body>
    <form method="post" action="chkform.php">
    First Name:<input type="text" size="12" maxlength="12" name="Fname"><br />
    Last Name:<input type="text" size="12" maxlength="36" name="Lname"><br />
    Gender:<br />
    Male:<input type="radio" value="Male" name="gender"><br />
    Female:<input type="radio" value="Female" name="gender"><br />
    Please choose type of residence:<br />
    Steak:<input type="checkbox" value="Steak" name="food"><br />
    Pizza:<input type="checkbox" value="Pizza" name="food"><br />
    Chicken:<input type="checkbox" value="Chicken" name="food"><br />
    <textarea rows="5" cols="20" name="quote" wrap="physical">Enter your favorite quote!</textarea><br />
    Select a Level of Education:<br />
    <select name="education">
    <option value="Jr.High">Jr.High</option>
    <option value="HighSchool">HighSchool</option>
    <option value="College">College</option></select><br />
    Select your favorite time of day:<br />
    <select name="TofD" size="3">
    <option value="Morning">Morning</option>
    <option value="Day">Day</option>
    <option value="Night">Night</option></select><br />
    <input type="submit" value="submit" name="submit">
    </form>

    </body>
    </html>


    and i need to create another page which i want to use to get the values from the form and to store in database...in a table.

    i can make connection to the database, run queries to insert, delete, update the data in data base e.t.c but i know the only basics ........

    so i need your help......thanks

  4. #4
    ahmad_IT is offline Senior Member+
    Last Online
    10th July 2011 @ 10:52 PM
    Join Date
    05 Apr 2009
    Posts
    36
    Threads
    8
    Credits
    0
    Thanked
    0

    Default

    please do reply................you people are just reading this!!!!!!!!!.....

  5. #5
    xauyala's Avatar
    xauyala is offline Senior Member+
    Last Online
    28th December 2012 @ 04:25 PM
    Join Date
    13 Feb 2009
    Posts
    501
    Threads
    31
    Credits
    1,080
    Thanked
    45

    Default

    It is not a valid html but it's not an issue here. Tags are OK and your file named chkform.php is supposed to collect all information sent by users.

    When you post html, warp the tags under this button and for php code use this.

  6. #6
    Join Date
    13 Dec 2009
    Location
    Charsadda Tangi
    Gender
    Male
    Posts
    24,332
    Threads
    334
    Credits
    393
    Thanked
    1297

    Default

    Quote ahmad_it said: View Post
    salam::

    Ji bhai jan......these are the details....which i think are enough to understand.

    I am using php5 , mysql version 5....working in dreamweaver 8...

    And i have started working on a personal project to do ....for my practice on local server on my computer...

    This is the code (need modification) of the form which i want to store the data:

    <html>
    <head>
    <title>personal info</title>
    </head>
    <body>
    <form method="post" action="chkform.php">
    first name:<input type="text" size="12" maxlength="12" name="fname"><br />
    last name:<input type="text" size="12" maxlength="36" name="lname"><br />
    gender:<br />
    male:<input type="radio" value="male" name="gender"><br />
    female:<input type="radio" value="female" name="gender"><br />
    please choose type of residence:<br />
    steak:<input type="checkbox" value="steak" name="food"><br />
    pizza:<input type="checkbox" value="pizza" name="food"><br />
    chicken:<input type="checkbox" value="chicken" name="food"><br />
    <textarea rows="5" cols="20" name="quote" wrap="physical">enter your favorite quote!</textarea><br />
    select a level of education:<br />
    <select name="education">
    <option value="jr.high">jr.high</option>
    <option value="highschool">highschool</option>
    <option value="college">college</option></select><br />
    select your favorite time of day:<br />
    <select name="tofd" size="3">
    <option value="morning">morning</option>
    <option value="day">day</option>
    <option value="night">night</option></select><br />
    <input type="submit" value="submit" name="submit">
    </form>

    </body>
    </html>


    and i need to create another page which i want to use to get the values from the form and to store in database...in a table.

    I can make connection to the database, run queries to insert, delete, update the data in data base e.t.c but i know the only basics ........

    So i need your help......thanks
    nice

  7. #7
    ahmad_IT is offline Senior Member+
    Last Online
    10th July 2011 @ 10:52 PM
    Join Date
    05 Apr 2009
    Posts
    36
    Threads
    8
    Credits
    0
    Thanked
    0

    Default

    what do you mean by "nice" ,,,,,,i need solution to my problem ..

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
  •