- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
6 Posted Topics
Re: Try using PDO's `lastInsertId()` method as an array parameter to the second statement. So, instead of `... VALUES( last_insert_id(), :product_details, ...`, try using `... VALUES( :product_id, :product_details, ...` and then in the array options provide the value for `:product_id` -ex: `array(':product_id' => $this->db->lastInsertId(), ':product_details' => $productDetails['product_details'], ...)` | |
Re: You need to add parentheses around the "tags" so that they get captured. Try: `var patt = /(<.*?>)/gim;` | |
Re: The `foreach()` construct expects something "iterable" -- an array or an object. That error basically indicates that `$this->load_all_user_objects()` is not returning something iterable. So you need to focus on the "`load_all_user_objects()`" method and figure out why it is not returning the expected results. | |
Re: The code you posted shows: if( $row['Quarter1']==1 ){...} else if($row['Quarter2']==2){...} else if($row['Quarter3']==3){...} Since $row contains "keys" corresponding to the DB table, the above code suggests that you have: Table Name: report Fields: userid, Quarter1, Quarter2, Quarter3,kra,kpi,... The problem is that when you execute `SELECT * FROM report ...`, then all … | |
Re: You need to provide the full file system path. So intead of "/MyFiles/4.jpg" use "**C:/xampp/htdocs**/MyFiles/4.jpg". I suggest you try: if(move_uploaded_file($_FILES['upload']['tmp_name'] , $_SERVER['DOCUMENT_ROOT'] . "/MyFiles/{$_FILES['upload']['name'] }")) ![]() | |
Re: To start, there is no tag named <ENCTYPE>. So, `<ENCTYPE="multipart/form`-`data">` should have been `<form method="post" ENCTYPE="multipart/form`-`data">`. However, you are not allowed to "nest" `<form>` tags. Immediately after the `<body>`, I see you opened a `<form>` tag, which you close at the very end of the page. The `enctype` attribute needs … |
The End.