Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
[Help] Stuck with website
Old 02-16-2010, 08:56 PM [Help] Stuck with website
Junior Talker

Posts: 1
Name: Sebastiaan
Trades: 0
Hi,

I bought small website but need to connect to mysl... and im not sure what to typ where ill put standard here hope someone can help me what to fill in tyvm

Quote:
<?php
ob_start();
?>
<?php /* ------------------------- */

// anti mysql injections
// bovenaan omdat dit belangrijk is
$locatie = $_SERVER['REQUEST_URI'];
$array = Array();
$array[] = "mysql"; <--- mysql db (localhost) ?
$array[] = "query"; <--- website query
$array[] = ")";
$array[] = ";";
$array[] = "INSERT";
$array[] = "%40";
$array[] = "DROPTABLE";
$array[] = "TRUNCATE";
foreach($array As $foutbezig) {
if(eregi($foutbezig,$locatie)) {
echo "Hey Waar Ben je nou mee Bezig ";
exit();
}
}
?>
<?PHP
@session_start();
error_reporting(E_ALL ^ E_NOTICE);
date_default_timezone_set('Europe/Amsterdam');

#variabelen
$titel = 'Website Titel - ';
$vipdagen = 30;
//die('De site wordt momenteel gereset, je kunt over enkele minuten weer spelen !
# Database connectie
//mysql_connect("localhost","root","");
//mysql_select_db("cc") or die('We hebben een probleem met de verbinding naar de database..');
$ext = (file_exists('../play.php')) ? '../' : '';
if(!(@mysql_connect("localhost","mihran","eminem") && @mysql_select_db("mihran_mihran"))) {
die(''Sorry Maar Dnb-whaky is nog bezig met de database of <BR><BR>We zijn bezig met het resetten !');
}

Last edited by Sebas05; 02-16-2010 at 09:11 PM..
Sebas05 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-19-2010, 09:55 AM Re: [Help] Stuck with website
Experienced Talker

Posts: 31
Trades: 0
Hi,

Have a look at this website!

http://www.tizag.com/mysqlTutorial/mysqlconnection.php

-Dillon
Dillon is offline
Reply With Quote
View Public Profile
 
Old 02-19-2010, 11:06 AM Re: [Help] Stuck with website
Super Talker

Posts: 111
Trades: 0
Hello,

you need to ask your hosting company about database server.
Also, you probably need to setup database with name 'cc' first. and set password and username.

then you need to uncomment this lines:

//mysql_connect("localhost","root","");
//mysql_select_db("cc") or die('We hebben een probleem met de verbinding naar de database..');

and replace localhost and root and password with your parameters accordingly.
__________________

Please login or register to view this content. Registration is FREE
- PHP/MySQL, XHTML/CSS, Ajax Development.


Please login or register to view this content. Registration is FREE
vasam is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to [Help] Stuck with website
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.59567 seconds with 12 queries