No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
7 Posted Topics
Hello, I have problem with entering default values in MYSQL database. When i insert new record using phpmyadmin it works fine (empty fields get default value), but when i use the same query in my application (written in PHP), empty fields in html form don't get default value in MYSQL … | |
Hello, my problem is related to uploading images (i keep info data in database and images in filesystem). I plan to generate image path from image ID, that's why i need to get the ID of the last inserted image. For example: image with ID 123456789 has this path /images/123/456/789 … ![]() | |
I have problem with a simple login script, keep getting message "Call to a member function on a non-object". The same code worked locally, but when i tried to run it online i got this message. have two php files:login.php and connect.php here is simplified code from connect.php [CODE]class Connect{ … | |
Re: Hello, i have similar problem. In OOP PHP, i got 2 classes: Database and News. In News class i call DB function and get result (multidimensional 2D array). Now i have to display that array in index.php. I call News class (lets say get_news() function) from index.php but cant retrieve … | |
Hello, In OOP PHP, i got 2 classes: Database and News. In News class i call DB function and get result (multidimensional 2D array). Now i have to display that array in index.php. I call News class (lets say get_news() function) from index.php but cant retrieve data and always get … | |
Re: [QUOTE]if ($_POST['group']) { $userGroup = $_POST['group']; foreach($_POST['snames'] as $x) { mysql_query("UPDATE users SET userGroup='$userGroup' WHERE recid='$recid' AND userId='$x'"); } echo 'Selected students have been updated to new groups.<br /><br /> To return to your editing page, <a href="member_account.php">click here</a>'; exit(); } // close if posted[/QUOTE] shouldn't $userGroup=$_POST['group'] be array too? … | |
Hi, don't know what's wrong, when i try to dispay an array, nothing is displayed. [CODE] // class.php class Connection{ var $arr=array(); function getData($username){ $q="select comment_id from comments where user='$username'"; $result=$this->conn->query($upit); $n=$result->num_rows; for($i=0; $i<n; $i++){ $this->arr[$I]=$result->fetch_array[MYSQLI_ASSOC]; // I've also tried $this->arr[] (with no index) but the same thing } return … |
The End.