39,392 Topics
![]() | |
i am trying to create a site, when user create his account then make automatic his directory with his name. when he wants to upload his photos, these photos go automatic in his folder or directory. im my register page i have added these lines: $addtothedb="INSERT INTO login (firstname,lastname,useremail,password,Gender,Dateofbirth) VALUES … | |
Hello. Quick question. I have several thousand emails pulled in from several email boxes throuph php imap and I need to search each subject with an array of search terms which returns a bitmask, one bit for each index of the array. 1 = found, 0 = not found. So, … ![]() | |
I have managed to assign privileges to an administrator and customer. My problem now is how to assign another user the privilege of seeing administror's posts? ![]() | |
I have a html select list where one can chose an option. <select name='price' id='price'> <option value='' >Select....</option> <option value='0-50,000'>0-50,000</option> <option value='50,000-100,000'>50,000-100,000</option> <option value='100,000-150,000'>100,000-150,000</option> <option value='150,000-200,000'>150,000-200,000</option> <option value='200,000 and above'>200,000 and above</option> <option value='see all'>See All</option> </select> When this list is submitted via a html submit button, this list shows … | |
how to check if the database is empty? my point is that the first person will be the administrator. here is my code $query="SELECT staffID,name,surname,email FROM stafftable"; $do=$con->prepare($query); $do->execute(); $record=$do->rowCount(); if($record>0): is there a much better option for this?. thanks | |
Hey guys, I am trying to use the **Google Calendar API** within a **php webpage** to display personal calendar events for each user. I made it displaying the events, but I'm stuck on displaying the Event Colors for every event. I was looking around the internet for two days now, … | |
http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=4&cid=55505&apiKey=5q4gzx43g6ukcrq798z2hz75&customerSessionId=&locale=en_US¤cyCode=USD&xml=<HotelListRequest><city>new%20delhi</city><RoomGroup><Room><numberOfAdults>2</numberOfAdults><numberOfResults></numberOfResults></Room></RoomGroup></HotelListRequest> when i call api directly to browser i got right data in xml format. but when i call it through curl.. sometime i get data in json format or sometimes no data.. [CODE] $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=4&cid=55505&apiKey=5q4gzx43g6ukcrq798z2hz75&customerSessionId=&locale=en_US¤cyCode=USD&xml=<HotelListRequest><city>new%20delhi</city><RoomGroup><Room><numberOfAdults>2</numberOfAdults><numberOfResults></numberOfResults></Room></RoomGroup></HotelListRequest>"); curl_setopt($ch, CURLOPT_FAILONERROR,1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_TIMEOUT, 15); $retValue = … | |
my firstvariable is and second variable is $one=07:54:PM; $two=07:55:AM; I am suffering from getting difference in munutes any body help me result in minutes. | |
I am trying to save 2 photos to my MySQL database. I can only see one of the 2 photos in the database (i.e. its name) but I see the 2 photos in the folder I store my photos. ( A picture of how the database looks like is attached.) … | |
I want to view the details of a product in single.php. The product is inserted in a newly added table "products" in the wordpress database and it has no post_type or post_id. | |
Hi All We found many Calendar, which are fine what we need is only show date in season like **25-12-2012 to 15-01-2013** and date we allow to use to select, like if we say available **26-dec and 10-jan** all the can do is select the date fr calender Please help … ![]() | |
I am trying to compare IF statements. if ($_POST['price'] =="see all"){ //show okolo } else if ($_POST["accommodation"] =="see all"){ //show chibuzo } This works but as soon as I add: else if ($_POST['price'] =="see all" AND $_POST['accommodation"]=="see all"){ //show henry } This stuff does not work, it now shows "okolo" … | |
I am using codeigniter if ($this->form_validation->run() ) always returns false. please help me out with this Here is my controller and view page as shown bellow This is controller admin.php <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Admin extends CI_Controller { public function index() { $this->login(); } public … | |
I am getting last inserted row in save page when adding dynamically inserting each row. any body help me i want to get all records in save page. my add-remove-row.php is <htmnl> <head> </head> <body> <form action="save.php" method="post" name="assigndate" enctype="multipart/form-data" > <table rules="all" style="background:#fff;"> <tr> <td style="font-size:14px;" >Name</td> <td style="font-size:14px;">Email</td> … | |
$time1=implode(":",$timepick1); $time2=implode(":",$timepick2); Result is 11 : 10 :00 11 : 11 :00 Any body help me to remove white spaces I want result 11:10:00 | |
When I view my list in my admin I would like to be able to make sure the controller name is sorted asc Currently it does not sort alphabetically 'name' => ucwords(str_replace('_', ' ', $controller)), **Function** public function index() { $data['title'] = "User Group Permissions"; $controller_files = $this->get_installed_permissions('name'); $data['controller_files'] = … | |
I am able to view content displayed from the API but i'm not able to extract the various contents. my codes are below: function parseInfo($barcode) { $url = "https://archive.org/advancedsearch.php?q=$barcode+AND+licenseurl:[http://creativecommons.org/a+TO+http://creativecommons.org/z]&fl[]=identifier,title,mediatype,collection&rows=15&output=json&callback=IAE.search_hits"; $contents = file_get_contents($url); // $json = json_decode($contents, true); return $contents; } echo $array = parseInfo($barcode); //var_dump($json); for ($i = 0; $i … | |
I've used different methods and found it difficult to integrate mashape for a dictionary.. My code is below: require_once 'unirest-php/src/Unirest.php'; // These code snippets use an open-source library. $response = Unirest\Request::get("https://montanaflynn-dictionary.p.mashape.com/define?word=irony", array( "X-Mashape-Key" => "T2rwS1jyBSmshKoZB5Un2kfpvgtRp1hUS9pjsnHvPoGNHIMpda", "Accept" => "application/json" ) ); What am I not getting right Regards | |
Hi everyone and Good day!Am new to php and I have a problem with the code below. <?php if (is_user_logged_in() ) //only logged in user can see this 'echo'<href="http://localhost/itsz.com/profile">Profile</a>'; ?> What i want it to do is to only show the link "profile" 'only' to logged in users but it … | |
Hello, I am looking for ckeditor that's able to upload image from computer directly without url - unfortunately there is license on it. What about tinymce also works the same way. I do not know how to make ckeditor my own version that's able to upload file directly from computer. … | |
I'm not able to get the content of this array, please can someone help? Where Am I getting it wrong? Below is the code $barcode = "9780980200447"; function parseInfo($barcode) { $url = "http://www.librarything.com/api_getdata.php?userid=timspalding&showstructure=1&max=10&showReviews=1&showTags=1&reviewsOnly=1&name=Jesus+is+Lord&&apikey=b27cb381baddff9c49b9dd27d9d96651&responseType=json"; $contents = file_get_contents($url); $json = json_decode($contents, true); return $json; } $array = (parseInfo($barcode)); //print_r($array); foreach ($array as … | |
Hello , today I was developing a short url system and I created this class to help me encode / decode integer (id) to small string. That way for example “Ac” means 3674 . Because I believe that it may be helpful to others too I share it here. Notice … ![]() | |
Hi I am not getting any response from the Cutenews forum. So perhaps Daniweb experts can help me. I have a couple of websites that have a Cutenews version 1.4.6 search form working. For my latest website I decided to use cutenews 2.0.2. As far as possible I have made … | |
Any body help me i am suffering from converting array to string Array ( [0] => 10 [1] => 40 [2] => 00 ) Array ( [0] => 10 [1] => 41 [2] => 00 ) I want convert to php $var1="10:40:00"; and $var2="10:41:00"; any body help me | |
i want to store input text box value into php variable without form submit and without using ajax,js,jquery etc., is it possible?? | |
Hi I want to read a pdf file using php. but i want toread that file line by line and made changes in it is it possible thanks | |
Hello everyone im working on like button which im a little confuzed with my problem i have this sql and im only able to like the tickets which are in my account $sql = "UPDATE `kladilnica` SET Liked = Liked+1 WHERE ticket_id = '".$like."' AND Username = '".$user."'"; but without … | |
Hi Guys hope your all well, I have found some code to create a quiz and this I have done, it was working a few weeks ago... but for some reason its now decied to stop working! When I run the page on my localhost I'm getting the following eorror … | |
I have a gallery in grid. For eg: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSegNVXMSnTRzHETnAjZXCd6siwHQysMXc_jp1OyiSDie2_9jhsIg Each row can cont max of 4 images. I have written while loop. i want to get the total count of images in each row For eg: row1 -> 4 (images) row2 -> 3 (images) <!-----------------------------------------------------------------------------> <div class="main_bg"> <div class="top_bg1"> <div … |
The End.