Include function

software development

#1

Hello,

Can somebody please tell me what to use for the <? include function

Now it is not working…


<? include "ringconfig.php"; $pincode = $_POST["pincode"]; $email = $_POST["email"]; //nummers controleren if ( preg_match("/[0-9]$/", $pincode)) { //nummer controle goed, start verbinding met ringtonio $code = $pincode; $co = "31"; $url = "http://www.ringtonio.nl/mp?test=$test&co=$co&rtlo=$rtlo&code=".urlencode($code); $result = @implode("",file($url)); if ($result=="OK") { $connectie = mysql_connect( $host, $dbuser, $dbpass); // Connectie maken mysql_select_db( $dbnaam, $connectie ); // Database selecteren $sql = "INSERT INTO calls (pincode, email) VALUES ('$pincode', '$email')"; mysql_query( $sql ); mysql_close(); echo "

Hartelijk dank voor uw donatie!

"; } else { echo "

Er is een ongeldige pincode ingevoerd!

"; } //nummer check fout } else { echo "

Er is een ongeldige pincode ingevoerd!

« terug "; } ?>

#2

Try
include (‘ringconfig.php’);

My website


#3

the parenthesis are unnecessary – the syntax is fine.

where is the ringconfig.php file in relation to the file that’s trying to include it? is it in the include_path?

track7 - my dream-hosted site


#4

Hello,

I don’t know what parenthesis is.
the ringconfig is in the same path as the rest.
I will include the ringconfig underneath.

Thank you
Alvast bedankt!


<? //mysql verbinding $host = "mysql.domain.nl"; $dbuser = "******"; $dbpass = "******"; $dbnaam = "mydbname"; mysql_connect($host,$dbuser,$dbpass) or die(mysql_error()); mysql_select_db($dbnaam); $rtlo = "35247"; $test = "0"; //Donatie gratis? 1=ja 0=nee ?>

(edited to remove user/pass credentials!)


#5

Please remove your database username and password.

File name is case sensitive in Unix. Could that be the problem?

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#6

removed :wink:

I spelled the name correct, so that is not the problem.

Maybe i have to use Curl for the include but i dont know how.

thnx


#7

I can still see the username and password. I hope they are fake ones.

I am able to use include function. I can’t figure out the problem. It is just simple include and nothing is wrong. WEIRD.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#8

Your use of the the file() function won’t work, because URL file access has been disabled across the DreamHost system. You will have to use a cURL-based alternative.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL