39,320 Topics

Member Avatar for
Member Avatar for lewashby

My head is starting to hurt just thinking about all the possabilities and impossabilities of mixing html and css with php and I'd like to understand how's this works. I did a php project for a guy one time and I came close to shooting myself in the face and …

Member Avatar for almostbob
0
358
Member Avatar for Hilal2009

The following on the attachment below are the page feeds with its comments returned by facebook PHP sdk and Graph API. What I want here is to get number of comments per user on each feed. Here are the codes $helper=new FacebookRedirectLoginHelper($url); try{ $session=$helper->getSessionFromRedirect(); if(isset($session)) { $request=(new FacebookRequest($session,"GET","/357971644373038/feed"))->execute()->getGraphObject()->asArray(); $comment=$request["data"]; $counter=count($comment,1); …

Member Avatar for pritaeas
0
388
Member Avatar for OtepTheThird

Hi Php'ers, I'm new to Php. I have some issues INSERTING date to MySQL by PHP. here's my code snippet: //date format $date1 = mysqli_real_escape_string($_POST['j_avail']); $d1 = date('Y-m-d',($date1)); $date2 = mysqli_real_escape_string($_POST['j_expir']); $d2 = date('Y-m-d',($date2)); the query: $sql = "INSERT INTO table (....,j_avail,j_expir) VALUES (....,'$d1','$d2')"; the HTML: <td id="ititle">Availability :</td> <td><input …

Member Avatar for Hilal2009
0
11K
Member Avatar for connoisseur2010

I am working on a multi-level marketing (matrix type) web application for a friend. I need assistance with a code snippet for generating a tree view of the downlines and the income calculations. The width is 3 and depth is 4. Thanks

Member Avatar for pritaeas
0
174
Member Avatar for shany0786

function getImage() { $session_data = $this->session->userdata('sessiondata'); $id = $session_data['user_id']; $this->db->where('user_id',$id); $r=$this->db->get('tbl_usrs'); if($r->num_rows()>0) { foreach ($r -> result_array() as $row) { $data[] = $row; } } $r->free_result(); return $data; //print_r($data); }} //class ends hello everone i am new to php codeigniter while displaying image from database i am getting error Severity: …

Member Avatar for cereal
0
162
Member Avatar for undertaket
Member Avatar for kannasekar

Hi to all. I am a newbie to PHP programming. In my project I'm having a student registration form. In that page I've populated checkboxes from database values for students who wants to enroll more than one classes. Everything got done. Now I need to give edit option to student …

Member Avatar for kannasekar
0
180
Member Avatar for anmol.raghuvanshi1

I get sick in finding error in my code i want to display a image from database having field profile_picture which has value like upload/large/imagename.jpg but i can't able to display it main thing is nothing is printed when i echo or print from controller when i view page source …

Member Avatar for anmol.raghuvanshi1
0
183
Member Avatar for davidjennings

Good day to you all, I ham having an issue the the following error (Fatal error: Call to a member function fetch_result() on a non-object in on line 167) which is the while ($row = $result->fetch_object()) every way I try to change this another error crops up. If yo can …

Member Avatar for davidjennings
0
1K
Member Avatar for cyb3r khan

hello ....... i am new in php i have started cms for the college but i am stucking in exam module . our college requirement is like this that they would enter questions from ms word and they want that every student should get randomize questions from one another ,,, …

0
74
Member Avatar for zeeshan009

Hi All, I am new in php and i am creating an application of attendence management where i have mark 'present' or 'absent'. I can do listing with the last column of two radio button 'A' or 'P' , user will select and then finally press submit. Please tell how …

Member Avatar for gabrielcastillo
0
92
Member Avatar for shanibb

HI, I am getting this error. I am very new in php. Kindly guides me. Warning: require_once(/home/ethnicera/public_html/system/startup.php): failed to open stream: No such file or directory in /homessd/ethnicera/public_html/index.php on line 17 regards, shanibb

Member Avatar for cereal
0
103
Member Avatar for mark103

Hey guys, I need some help with my code, I have a trouble with checking on two different strings as I want to check if the string in the variable `$program_times` are equal to `PM` and `$next_program_times` are equal to `AM`. When I try it, it will show nothing and …

Member Avatar for cereal
0
149
Member Avatar for solomon_13000

I am attempting to organize my code in the following manner: if (is_ajax()) { if (isset($_POST["action"]) && !empty($_POST["action"])) { //Checks if action value exists $action = $_POST["action"]; switch($action) { //Switch case for value of action case "initMsg": initMsg_function(); break; case "initCombo": initCombo_function(); break; } } } function is_ajax() { return …

Member Avatar for minitauros
0
56
Member Avatar for kannasekar

Hi Everyone, I am a newbie to PHP programming. I just need to update the status when user click delete button. Here is the piece of code that I tried. When I echo the values of $mode and $id it prints properly. But the update query block doesn't working. <?php …

Member Avatar for kannasekar
0
472
Member Avatar for Stefce

Hello i have three colums which i want to make users can upload pictures/videos and automaticly to add to one of the colums but i cannot figure out how to do that... here is the HTML code i have <div class="main"> <div class="row"> <div class="col-md-3"> <div class="panel panel-default"> <div class="panel-body"> …

Member Avatar for pritaeas
0
180
Member Avatar for anmol.raghuvanshi1

hello, I want to store image path in database along with image name like /uploads/profilepic/name.jpg. what happening is only path is beinged saved not image name like field in my table prfile_picture has updated /uploads/profilepic/ but i want image name also after trailing slash so that i can retrieve that …

0
126
Member Avatar for Susan_4

Good day, I am a PHP beginner, but have managed to set up a shopping cart on my jewelry website (with the help of video tutorials found online). Everything is working well, but I need to add a text box to my product page where people can add the engraving …

Member Avatar for Susan_4
0
914
Member Avatar for James_43

Hi Guys, As part of an online store, I have a dropdown box where the user selects a size. If the user selects size L then the 'add to cart' button needs to link to a page different than if the user selected size M. I figured out that I …

Member Avatar for James_43
0
303
Member Avatar for Stephano

Iam using gravity forms. I have a registration form that people fill in,the form has both entry fields and drop down fields. i want to capture the entries that they enter in the drop down fields because there is another form that has similar fields, and would not want them …

0
73
Member Avatar for anmol.raghuvanshi1

hello,everyone i am trying to access user id from database in session data but no success till now?? //Controller function upload() { $user_id = $this->session->userdata('user_id'); //set preferences $config['remove_spaces']=TRUE; $config['encrypt_name'] = TRUE; // for encrypting the name $config['upload_path'] = './upload/'; $config['allowed_types'] = 'jpg|png|gif'; $config['max_size'] = '10248'; //load upload class library $this->load->library('upload', …

Member Avatar for lps
0
2K
Member Avatar for UK-1991

Hello, I tried to create a gallery using php admins can upload multiple images all the images are uploading correctly like the image is saving in the database as much as I can but the problem is that the image is saving once in the folder Like loop runs images …

Member Avatar for lps
0
238
Member Avatar for lloyd.farrell.7

Hi everyone - Just a quick request for help please, I am trying to add two additional country codes to the following if statement. if ($country_code == "GB"){ I would like to add or "sct" or "wls" - But everytime I try I get error messages... Sorry if its a …

Member Avatar for lloyd.farrell.7
0
84
Member Avatar for javaid97

Hi, If anybody want to test simple email online form, here is a sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Test php mail</title> </head> <body> <?php $to = "example@example.com" . ", "; //writing mail to the user $subject = "mailer"; …

Member Avatar for javaid97
-1
211
Member Avatar for kyupa.suria

.............................. <form action="introducere.php" method="POST" enctype="multipart/form-data"> .............................. <td>Picture 1:<input id="picture1" name="picture1" type="file"><br> Picture 2:<input id="picture2" name="picture2" type="file"><br> Picture 3:<input id="picture3" name="picture3" type="file"> </form> .............................. **introducere.php** ............................ if(isset($_FILES['picture1'])){ $file = $_FILES['picture1']; $file_name = $file['name']; echo $file['name']; $picture1 = $file['name']; if(!$picture1){//if no picture browsed $picture1="NULL"; } } if(isset($_FILES['picture2'])){ $file2 = $_FILES['picture2']; $file_name2 = …

Member Avatar for pritaeas
0
323
Member Avatar for Hendo

Sorry, not sure how to even word the article title...it's been so long since I did HTML or PHP. I have a small web page that I wrote several years ago. It's all HTML/CSS with one segment of PHP that is used to call to my database to populate scores …

Member Avatar for Hendo
0
197
Member Avatar for Aeonix

I'd like to create `/admin.php` page, which would have AJAX request, sent over to `/core/adm/index.php`, that's easy, basic AJAX request will do just that. But I don't want any direct access to `/core/adm/index.php`, I want it to be accessed only by AJAX request from `/admin.php`. Is there a way to …

Member Avatar for Aeonix
0
227
Member Avatar for Aeonix

$replacedString = str_replace(array_keys($array1), $array1, $externalVariableString); I have an entire array above that called `$championToIdConversionArray`, it has about 650 switches, it looks something like this $array1 = array( "1" => "Banana", "12" => "Monkey", "2" => "Apple", "121" => "Human" ); Now if I let script parse numbers "121", it won't …

Member Avatar for Aeonix
0
187
Member Avatar for elbren

# my Form # <form role="form" method="post"> <div class="form-group"> <label for="email">Email address:</label> <input type="text" class="form-control" id="email" name="email"> </div> <div class="form-group"> <label for="pwd">Password:</label> <input type="text" class="form-control" id="pwd"> </div> <button type="button" class="btn btn-default" data-toggle="modal" data-target="#myModal" name="submit">Submit</button> </form> # my Modal # <!-- Modal --> <div id="myModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- …

Member Avatar for Aeonix
0
580
Member Avatar for hell hansen

Hi guys! Im trying to get the ighest value from any array coming from mysql query. What i've till now is it! class vfsClass{ function localvfs() { try { $sql = $this->link->prepare("select Vfs_ID from tbl_track order by id asc"); $sql->execute(); $rs = $sql->fetchAll(PDO::FETCH_ASSOC); return $rs; } catch (PDOException $e) { …

Member Avatar for hell hansen
0
2K

The End.