diiazopde
-
Posts
14 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by diiazopde
-
-
thanks ,
justsomeguythe variable $data_base_login is defined in loginDataBase .php and i show it in the first post
//app/loginDataBase.php
try
{
$data_base_login = new PDO('mysql:host=localhost;dbname=espacemembre;charset=utf8', 'root','');
$data_base_login->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
} -
thanks for responding , actually i'm trying to implement the MVC desgin patterns , this variables will be bind in a file which exit in the controllers directory
thank you again
-
hi i'm trying to create an app with php
but i have a real problem , i need help , please and thank you
// login.php function check_user_authentication(User $user)//return the user id if exist in data base else return false { require_once ('../app/models/loginDataBase.php'); global $data_base_login; $request = $data_base_login->prepare('SELECT id FROM membres WHERE password= :password AND email = :email '); ///my problem is in this line $request->execute(array( 'password' => $user->getPassword(), 'email'=> $user->getEmail() )); $id_user = $request->fetch(); $request->closeCursor(); if ($id_user) return $id_user; else return false; } //app/loginDataBase.php try { $data_base_login = new PDO('mysql:host=localhost;dbname=espacemembre;charset=utf8', 'root',''); $data_base_login->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(Exception $e) { die('Erreur : '.$e->getMessage()); }
the error is :Fatal error: Call to a member function prepare() on null in C:\xampp\htdocs\youMvc\app\models\Login.php on line 14
thanks every one
-
canvas
in HTML/XHTML
hi , i tried to change the width and height of the canvas by using the width and height of a <div></div>
<!DOCTYPE html><html><head><style>#blue{ background-color:blue; height:200px; width:200px;}</style></head><body><div id="blue" >vfn</div><br/><canvas id="myCanvas" style="border:1px solid #d3d3d3;">Your browser does not support the HTML5 canvas tag.</canvas><script>var b = document.getElementById("blue");var c = document.getElementById("myCanvas");var ctx = c.getContext("2d");var imgData = ctx.createImageData(b.width,b.height);var i;for (i = 0; i < imgData.data.length; i += 4) { imgData.data[i+0] = 255; imgData.data[i+1] = 0; imgData.data[i+2] = 0; imgData.data[i+3] = 255;}ctx.putImageData(imgData,0,0);</script></body></html>
but it doesnt work , why?? answers please,and thank you
-
its work now, thank you
it was getAttribute()
-
i want the hide and show a block when you clik on an image, using Javascript code, so this is the complete code for this function but it doenst work
<script>
function hide(){ if(document.getElementById("arrow").src == "arrowup.png"){ document.getElementById("arrow").src = "arrowdown.png"; document.getElementById("box").style.display = "none"; } else { document.getElementById("arrow").src= "arrowup.png"; document.getElementById("box").style.display = "block"; } }
</script>
<img id="arrow" onclick="hide()" src="arrowdown.png" width="30" height="30"/>
<div id="box" style="display:none;">
</div>
please help me!!
-
i did ,but but no results, no erro message found
-
thanks for responding;
i try it, but it doesn't work , still no solution ??????
-
hi , i try to write a function that provide to change the image when i click on it:
<body>
<script>
function hide(){ if (document.getElementById("image").src == "arrowup.png"){ document.getElementById("image").src = "arrowdown.png"; } else { document.getElementById("image").src = "arrowup.png"; } }
</script>
<img id="image" onclick="hide()" src="arrowdown.png" width="30" height="30"/>
</body>
but it doesnt work , what is the problem, please????
-
thank you very much
-
thanks for responding, i want to run it and make it visible to anyone if it is possible thanks again;
-
hi! i'm new to HTML but i can programme with c,j2EE and JS ,
i want to know if there is a way to run my code in an html page, (i mean doing an application inside the HTML page);
-
you can use the Html tag <center></center> within that section
php & sql problem
in PHP
Posted · Edited by diiazopde
ok , thanks man , i found the problem it was about including the file with wrong way , Thanks appreciate it