php header Content-type text plain echo Connect link mysql_connect loc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
header("Content-type: text/plain");
echo("Connect ");
$link = mysql_connect('localhost','otakeru_onotole', 'de>!kg)JWY9t');
if($link){ echo("OK"); } else { echo("FAILED"); }
echo("\n");
echo("Select DB ");
$db = mysql_select_db('otakeru_zlogene');
if($db){ echo("OK"); } else { echo("FAILED"); }
echo("\n");
echo("Execute procedure");
mysql_query("CALL testproc()");
echo("\n");
echo('#' . mysql_errno() . ' ' . mysql_error());
echo("\n");
echo("Execute function ");
$r = mysql_query("SELECT testfunc()");
if($r){ echo("OK"); } else { echo("FAILED"); }
echo("\n");
echo('#' . mysql_errno() . ' ' . mysql_error());
echo("\n");
?>