Click here to Skip to main content
15,563,248 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
SuggestionRe: TLDR Pin
Richard Deeming17-Oct-17 5:31
mveRichard Deeming17-Oct-17 5:31 
QuestionThinkphp 5.0 query table how the array of how to get rid of a column? And then save it to another table? Pin
micccn14-Oct-17 0:37
micccn14-Oct-17 0:37 
Questionhelp me on my php script Pin
horlartech8-Sep-17 13:03
horlartech8-Sep-17 13:03 
SuggestionRe: help me on my php script Pin
Richard MacCutchan8-Sep-17 20:24
mveRichard MacCutchan8-Sep-17 20:24 
GeneralRe: help me on my php script Pin
horlartech10-Sep-17 3:39
horlartech10-Sep-17 3:39 
GeneralRe: help me on my php script Pin
horlartech10-Sep-17 3:49
horlartech10-Sep-17 3:49 
QuestionRe: help me on my php script Pin
Richard MacCutchan10-Sep-17 5:17
mveRichard MacCutchan10-Sep-17 5:17 
QuestionCall to a member function prepare() on a non-object Pin
Igoussam28-Aug-17 11:56
Igoussam28-Aug-17 11:56 
Hello friends I have a problem I would like to modify an employee but it gives me this error:Fatal error: Call to a member function setcin() on a non-object
I do not understand why. This is my function:
PHP
<pre>public function update(employe $employe){
$this->makes();
$this->st=$this->pdo->prepare("update employe set cin=:cin,nom_em=:nom_em,id_grade=:id_grade,id_affectation=:id_affectation,adress=:adress where id_em=:id_em");
$this->st->bindvalue(':cin',$employe->getcin(),pdo::PARAM_STR);
$this->st->bindvalue(':nom_em',$employe->getnom_em(),pdo::PARAM_STR);
$this->st->bindvalue(':id_grade',$employe->getid_grade(),pdo::PARAM_INT );
$this->st->bindvalue(':id_affectation',$employe->getid_affectation(),pdo::PARAM_INT );
$this->st->bindvalue(':adress',$employe->getadress(),pdo::PARAM_STR);
$exe=$this->st->execute();

}
public function read($id_em){
$this->makes();
$this->st=$this->pdo->prepare("select * from employe where id_em=:id_em");
$this->st->bindvalue(':id_em',$id_em,pdo::PARAM_INT );
$exe=$this->st->execute();
}

And here is the call of the function:
PHP
<pre><?php

include'manager.php';
$manager=new manager();
$co=$manager->read($_POST["id_em"]);
$co->setcin($_POST['cin']);
$co->setnom_em($_POST['nom_em']);
$co->setid_grade($_POST['id_grade']);
$co->setid_affectation($_POST['id_affectation']);
$co->setadress($_POST['adress']);
$manager->update($co);
?>

and thank you
AnswerRe: Call to a member function prepare() on a non-object Pin
Richard MacCutchan28-Aug-17 22:36
mveRichard MacCutchan28-Aug-17 22:36 
Questionhow to get hard disk Serial Number using php on server side Pin
Lakshmanan Duraisamy27-Jul-17 0:15
Lakshmanan Duraisamy27-Jul-17 0:15 
AnswerRe: how to get hard disk Serial Number using php on server side Pin
Richard MacCutchan27-Jul-17 0:35
mveRichard MacCutchan27-Jul-17 0:35 
AnswerRe: how to get hard disk Serial Number using php on server side Pin
Jochen Arndt27-Jul-17 1:09
professionalJochen Arndt27-Jul-17 1:09 
SuggestionRe: how to get hard disk Serial Number using php on server side Pin
Richard Deeming27-Jul-17 2:31
mveRichard Deeming27-Jul-17 2:31 
QuestionPHP connecting to vb.Net Pin
Member 1296881918-Jul-17 20:48
Member 1296881918-Jul-17 20:48 
AnswerRe: PHP connecting to vb.Net Pin
Richard MacCutchan18-Jul-17 21:49
mveRichard MacCutchan18-Jul-17 21:49 
QuestionTrying to create a secure login script, just have a few questions. Pin
BlackMagix14-May-17 5:40
BlackMagix14-May-17 5:40 
AnswerRe: Trying to create a secure login script, just have a few questions. Pin
Superolmo10-Jul-17 10:09
Superolmo10-Jul-17 10:09 
QuestionSorting array and adding position numbers while/after sorting Pin
Member 131868238-May-17 5:15
Member 131868238-May-17 5:15 
QuestionHelp Pin
Member 1302311826-Apr-17 4:40
Member 1302311826-Apr-17 4:40 
AnswerRe: Help Pin
Jochen Arndt26-Apr-17 4:58
professionalJochen Arndt26-Apr-17 4:58 
GeneralRe: Help Pin
Member 1302311826-Apr-17 5:14
Member 1302311826-Apr-17 5:14 
GeneralRe: Help Pin
Jochen Arndt26-Apr-17 5:43
professionalJochen Arndt26-Apr-17 5:43 
GeneralRe: Help Pin
Member 1302311826-Apr-17 5:55
Member 1302311826-Apr-17 5:55 
GeneralRe: Help Pin
Jochen Arndt26-Apr-17 6:01
professionalJochen Arndt26-Apr-17 6:01 
QuestionHow To Add More Than One Entry On A Single Cell/Array ? Pin
Member 129567898-Apr-17 15:17
Member 129567898-Apr-17 15:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.