Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 04-16-2012, 04:43 AM   #1
alen12345
Registered User
 
Join Date: Oct 2011
Location: LDH
Posts: 225
Data Store in MySQL

How Data Stored in MySQL when i attached MySQL to PHP Websites?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
alen12345 is offline   Reply With Quote

Old 10-30-2012, 07:38 PM   #2
henryc10
Registered User
 
Join Date: Oct 2012
Posts: 33
first you need to create connection to the database

mysql_connect(servername,username,password);

below is an example we store the connection in a variable ($con) for later use in the script. The "die" part will be executed if the connection fails:

<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

// some code

mysql_close($con);
?>

mysql_close above will close the connection automatically when the script ends.
henryc10 is offline   Reply With Quote
Old 04-30-2013, 06:30 AM   #3
Kunalmathur
Registered User
 
Join Date: Dec 2012
Location: Delhi
Posts: 535
thanks for given information...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Kunalmathur is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nature products data feed? Forum-Engine Making money on the web 1 12-10-2014 05:00 AM
Leveltenhosting.com E-commerce Solution - SSL cert - Free Template - Store Config Leveltenhosting Post your ad here 0 02-08-2012 01:44 AM
Xmas and new year speical. Get 25% off on all hosting packages storminternet Post your ad here 0 12-30-2011 11:58 AM
Mysql and PHP for hosting servers?? wryfhk22 PHP / mySQL 0 09-22-2011 02:40 AM
Exporting data of a table in mysql using php fro foxpro ncjbhd PHP / mySQL 0 09-06-2011 12:15 AM


All times are GMT -7. The time now is 06:51 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.