Page 2 of 2 FirstFirst 12
Results 13 to 17 of 17

Thread: Php script ko cunnect kaise karte hai mysql se

  1. #13
    zaeemalvi is offline Member
    Last Online
    24th November 2016 @ 07:59 AM
    Join Date
    26 Sep 2015
    Gender
    Male
    Posts
    262
    Threads
    12
    Thanked
    11

    Default

    <?php
    //creates connection
    $connect = mysql_connect("host name","username","passowrd");
    //selects database and shows error if
    any.
    $select = mysql_select_db("database name",$connect) or die(mysql_error());
    //inserts into database
    $insert = mysql_query("INSERT INTO `table name` (`column1 name`,`colmn 2 name`,`column 3 name`) VALUES ('value1','value2','value3')");
    ?>

  2. The Following User Says Thank You to zaeemalvi For This Useful Post:

    mshobi (5th March 2016)

  3. #14
    mshobi's Avatar
    mshobi is offline Senior Member+
    Last Online
    4th November 2017 @ 01:45 PM
    Join Date
    30 Nov 2010
    Location
    Karachi
    Gender
    Male
    Posts
    349
    Threads
    9
    Credits
    1,420
    Thanked
    8

    Default

    Thanks Bro.

  4. #15
    Redrain is offline Junior Member
    Last Online
    16th March 2016 @ 11:28 PM
    Join Date
    13 Mar 2016
    Age
    31
    Gender
    Male
    Posts
    15
    Threads
    1
    Credits
    146
    Thanked: 1

    Default

    <?php

    // 1. Create a database connection
    $connection = mysql_connect(DB_SERVER,DB_USER,DB_PASS);
    if (!$connection) {
    die("Database connection failed: " . mysql_error());
    }

    // 2. Select a database to use
    $db_select = mysql_select_db(DB_NAME,$connection);
    if (!$db_select) {
    die("Database selection failed: " . mysql_error());
    }
    ?>

  5. #16
    Prince786123 is offline Senior Member+
    Last Online
    29th November 2017 @ 05:17 PM
    Join Date
    05 Apr 2017
    Age
    21
    Gender
    Male
    Posts
    63
    Threads
    8
    Credits
    452
    Thanked: 1

    Default hi

    hi

  6. #17
    asad_leo94's Avatar
    asad_leo94 is offline Junior Member
    Last Online
    3rd May 2017 @ 11:31 AM
    Join Date
    15 Apr 2017
    Location
    Islamabad
    Gender
    Male
    Posts
    25
    Threads
    1
    Credits
    316
    Thanked
    0

    Default

    config.php ya admin.php file ma edit kar lo

Page 2 of 2 FirstFirst 12

Similar Threads

  1. *******(Hujra)*******
    By mkasikandar in forum Pashto
    Replies: 56980
    Last Post: 9th October 2017, 09:06 PM
  2. Replies: 19
    Last Post: 5th September 2015, 09:52 PM
  3. ISHAQ karte ho aur,zindagi ki baat karte ho,
    By vkky in forum Roman Urdu Poetry
    Replies: 0
    Last Post: 5th May 2012, 12:35 AM
  4. PHP Zone
    By shakeel in forum English IT Zone
    Replies: 27
    Last Post: 16th December 2011, 03:43 AM
  5. If you need help abt PHP..Mysql..post here.
    By scimo in forum Ask an Expert
    Replies: 9
    Last Post: 20th April 2009, 09:10 AM

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
  •