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

Linux, Apache, MySQL, PHP

 
SuggestionRe: TLDR Pin
Richard Deeming17-Oct-17 4:31
mveRichard Deeming17-Oct-17 4: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
micccn13-Oct-17 23:37
micccn13-Oct-17 23:37 
Questionhelp me on my php script Pin
horlartech8-Sep-17 12:03
horlartech8-Sep-17 12:03 
SuggestionRe: help me on my php script Pin
Richard MacCutchan8-Sep-17 19:24
mveRichard MacCutchan8-Sep-17 19:24 
GeneralRe: help me on my php script Pin
horlartech10-Sep-17 2:39
horlartech10-Sep-17 2:39 
GeneralRe: help me on my php script Pin
horlartech10-Sep-17 2:49
horlartech10-Sep-17 2:49 
QuestionRe: help me on my php script Pin
Richard MacCutchan10-Sep-17 4:17
mveRichard MacCutchan10-Sep-17 4:17 
QuestionCall to a member function prepare() on a non-object Pin
Igoussam28-Aug-17 10:56
Igoussam28-Aug-17 10: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 21:36
mveRichard MacCutchan28-Aug-17 21:36 
Questionhow to get hard disk Serial Number using php on server side Pin
Lakshmanan Duraisamy26-Jul-17 23:15
Lakshmanan Duraisamy26-Jul-17 23:15 
AnswerRe: how to get hard disk Serial Number using php on server side Pin
Richard MacCutchan26-Jul-17 23:35
mveRichard MacCutchan26-Jul-17 23:35 
AnswerRe: how to get hard disk Serial Number using php on server side Pin
Jochen Arndt27-Jul-17 0:09
professionalJochen Arndt27-Jul-17 0:09 
SuggestionRe: how to get hard disk Serial Number using php on server side Pin
Richard Deeming27-Jul-17 1:31
mveRichard Deeming27-Jul-17 1:31 
QuestionPHP connecting to vb.Net Pin
Member 1296881918-Jul-17 19:48
Member 1296881918-Jul-17 19:48 
AnswerRe: PHP connecting to vb.Net Pin
Richard MacCutchan18-Jul-17 20:49
mveRichard MacCutchan18-Jul-17 20:49 
QuestionTrying to create a secure login script, just have a few questions. Pin
BlackMagix14-May-17 4:40
BlackMagix14-May-17 4:40 
AnswerRe: Trying to create a secure login script, just have a few questions. Pin
Superolmo10-Jul-17 9:09
Superolmo10-Jul-17 9:09 
QuestionSorting array and adding position numbers while/after sorting Pin
Member 131868238-May-17 4:15
Member 131868238-May-17 4:15 
QuestionHelp Pin
Member 1302311826-Apr-17 3:40
Member 1302311826-Apr-17 3:40 
AnswerRe: Help Pin
Jochen Arndt26-Apr-17 3:58
professionalJochen Arndt26-Apr-17 3:58 
GeneralRe: Help Pin
Member 1302311826-Apr-17 4:14
Member 1302311826-Apr-17 4:14 
GeneralRe: Help Pin
Jochen Arndt26-Apr-17 4:43
professionalJochen Arndt26-Apr-17 4:43 
GeneralRe: Help Pin
Member 1302311826-Apr-17 4:55
Member 1302311826-Apr-17 4:55 
GeneralRe: Help Pin
Jochen Arndt26-Apr-17 5:01
professionalJochen Arndt26-Apr-17 5:01 
QuestionHow To Add More Than One Entry On A Single Cell/Array ? Pin
Member 129567898-Apr-17 14:17
Member 129567898-Apr-17 14: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.