Pues hice una pagina web para obtener una calificacion en una materia y ya hice la pagina, PERO, tiene algo malo que no esta seleccionada la base de datos, bueno el archivo se llama restaurant.php que es la conexion de datos y esta dentro de una carpeta llamada connections, y su algoritmo es este:
<?php
# FileName="Connection_php_mysql.php"
# Type="MYSQL"
# HTTP="true"
$hostname_restaurant = "localhost";
$database_restaurant = "restaurant";
$username_restaurant = "root";
$password_restaurant = "root";
$restaurant = mysql_pconnect($hostname_restaurant, $username_restaurant, $password_restaurant) or trigger_error(mysql_error(),E_USER_ERROR…
?>
Nose si este bien, y las secciones de mi pagina que van a agarrar esa conexion se llaman, iniciar y administrar, pondre el iniciar solo una pequeña parte como ejemplo:
<?php require_once('/var/www/Connections/resta… ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_strin… ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
y ya, pues no detecto el problema y tengo que entregarla hoy =( gracias por su ayuda y que Dios les Bendiga =)
<?php
# FileName="Connection_php_mysql.php"
# Type="MYSQL"
# HTTP="true"
$hostname_restaurant = "localhost";
$database_restaurant = "restaurant";
$username_restaurant = "root";
$password_restaurant = "root";
$restaurant = mysql_pconnect($hostname_restaurant, $username_restaurant, $password_restaurant) or trigger_error(mysql_error(),E_USER_ERROR…
?>
Nose si este bien, y las secciones de mi pagina que van a agarrar esa conexion se llaman, iniciar y administrar, pondre el iniciar solo una pequeña parte como ejemplo:
<?php require_once('/var/www/Connections/resta… ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_strin… ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
y ya, pues no detecto el problema y tengo que entregarla hoy =( gracias por su ayuda y que Dios les Bendiga =)