39,326 Topics
| |
i have this code so to hinder from access when the url is directly type i understand BASEPATH is a constant but can anyone give me idea on how to cofigure the basepath? do i need to create a constant folder and constant php file? if (! defined('BASEPATH')) exit('No direct … | |
Following function implements a way to find all the indices of a given $needle in $haystack. There is at least one bug in the implementation. Find and fix the bug(s). <?php function findAllIndices($haystack, $needle) { $indices = array(); while ($index = strpos($haystack, $needle)) $indices[] = $index; return $indices; } | |
Hi i want to display if possible a field from another table table a has group_id linked to group table..in edit it shows me the group_id i want to display near it the libelle of groupe i m just starting in cakephp please fine the code <div class="acnopens form"> <?php … | |
I am using IIS for php. I want to confirm whether it uses fastcgi or cgi I used php_sapi_name() and it gives "cgi-fcgi" I don't know what does it mean Is there any other way to find the same | |
Hi all, I have this script sending an really simple html email. It works fine, but I cant seem to preserve the line breaks when sending the email to the client. Any idea how I can preserve line breaks? Thought nl2br would do the trick.. // Data der skal emailes … | |
So here is what I want. if (tracks, the db) (user_id, the row) for '".$_SESSION['user']['id']."' = equal (tracks, row) in (users, the db) for '".$_SESSION['user']['id']."' exit else update (users, the db) (tracks, the row) to match. This isn't the script as I don't know where to start but I am … | |
![87c254267ddc1a1686974c863a7bf415](/attachments/large/4/87c254267ddc1a1686974c863a7bf415.png "87c254267ddc1a1686974c863a7bf415") ![282a041b1e7ea8ddc9240fe7bb9989fe](/attachments/large/4/282a041b1e7ea8ddc9240fe7bb9989fe.png "282a041b1e7ea8ddc9240fe7bb9989fe") hi everyone can anyone give me a coad for the form of search inside the php i mean they belong in the same page ? here's my php command for the pagination and results //Count the total number of row in your table*/ $count_query = mysql_query("SELECT … | |
I am getting the following error on my home page. I am new to php code and this one is looking pathetic on my wordpress site. any help would be highly appreciated. The error is as below: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given on line 39 … | |
I have no previous knowledge of connecting to a web service using JSON and I haven't been able to find any examples online that clearly explain how I would go about connecting using authentication. I have the following documentation: Credential (type: Credential) - An object used to authenticate the client … | |
Currently I've a database table call category: Table attribute: id,parent_id,name How can I make it display in the following structure? <li class="dropdown level-0"><a href="#">electronics<img src="images/dropdown-arrow.png" alt="" /></a> <ul> <li class="level-1"><a href="#">Televisions</a> <div class="level-1-div clearfix"> <ul> <li class="level-2"><a href="catalog.html">Projectors</a></li> <li class="level-2 last-level-2"><a href="catalog.html">DVD Players</a></li> </ul> <div class="productImageDiv"> <a href="catalog.html"><img src="images/product-image2.png" alt="" … | |
I have a query in which I insert data with json_encode(), and I am trying to receive that data with json_decode(), however, I get an error message that is something like this: stripslashes() expects parameter 1 to be string, array given in I have this database table that has about … | |
Dears, how to get div or content informations text and pictures from another website and show in my webpage? Please help! | |
Foloowing is my out put of data, Now I need to show in label the 'amout' and 'trxID'. Please help me. { "transaction": { "amount": "29", "counter": "1", "currency": "BDT", "receiver": "01811700563", "reference": "a", "sender": "01711643998", "service": "Payment", "trxId": "270413065", "trxStatus": "0000", "trxTimestamp": "2013-07-02T00:00:00+06:00" } } | |
Hi all, I would like to get my head around how I can create a singleton db pattern. What I have now works though, but as I know its not a singleton - My idea is this: * I would like a class that holds all config information and them … | |
Hullo, I have hit a snag when I got to the point where I draw a bar graph. I want to have a bar graph based on the database records, but I have no idea on how to do it. I tried searching online, but to no avail. I only … | |
i am building a message system for website.i have two table one store user_detail and other store message sent to each other users. you can see main.jpg file where inbox sent etc.. will be display and action takes accordingly. $query='select m1.id, m1.title, m1.timestamp, count(m2.id) as reps, user_detail.user_id as userid, user_detail.username … | |
Hi, I am creating an internal messaging system.In the system users can communicate with each other and send messages internally. The functionality is working fine and I am using AES encryption for encrypting the message.I am also using SSL for sending the messages. Now I want to implement the message … | |
Hello, I am familiar with the get_defined_functions() function as a way of listing all of the user defined functions. Is there a way with PHP to also determine from which file the user function was defined? Consider the following example. Assume there are three files: - index.php - user_functions1.inc.php - … | |
I have strated this thread so that we can all share our favorites ide's for PHP My personal favorites are : Notepad++ Netbeans PHP Aptana OK share your favorites and see who will win you can add any php editor you like mac linux android windows it dosen't matter Let's … | |
Hi , I have an website from where I want to view image using any image viewer . Images are uploaded in cloud server from where I want to show images by clicking on a link . Images are downloaded but taking much time . What I want is to … | |
Hi all, How come this class doesnt connect to the database..? class credentials { private static $config = array(); const DB_USER = 'root'; const DB_PASS = ''; const DB_HOST = 'localhost'; const DB_NAME = 'dev_dcs'; public function __construct() { self::$config['user'] = self::DB_USER; self::$config['pass'] = self::DB_PASS; self::$config['host'] = self::DB_HOST; self::$config['name'] = … | |
| Hi friends, recently i am learning php with your help and online tutorials. I googled for anatomy of GET and POST but didnt find satisfaction. So what is working behind GET and POST Methods ? How they work between client(browser) and Server ? Thanx. |
Hey guys, Got this wordpress script which is bugging out for me :/ function JobBoard_admin_add() { ?> <div class="wrap"> <?php $con=mysqli_connect("localhost","profiled_job","","profiled_jobboard"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql="INSERT INTO details (Employer, LearningProvider, ContractedProvider, LearningDeliverySite, VacancyDescription, VacancyTitle, EmployerDescription, VacancyLocation, NoVacancies, VacancyRefNumber, … | |
I have table which has the table field name: - Start Date - Duration Count (e.g. 1, 2 or 3) - Duration Name (e.g. Daily, Monthly, Yearly) - End Date How do I code in PHP to calculate the end date from a particular start date? E.g. The start date … | |
I have the following code that is working but i need further functionality. The code shows the payments made and is based on two tables. The payments table that has the following fields mID, type (account type), dayentered(date when the money was donated) and the members table has the following … | |
Hi, I have a table in database and I want to create a hash value string that will be based on the entries of that table. Is it possible in php that I can create sha1 value of the whole table and how can I compare the sha1 value that … | |
| What is possibly wrong with following script that caused it to scream ? <!DOCTYPE html> <html> <head> <script> function formSubmit() { document.getElementById("form1").submit(); } </script> </head> <body> <form id="form1" action="test.php" method="POST"> Name: <input type="text" name="name" ><br/> <input type="button" onclick="formSubmit()" value="Submit" /> </form> <?php $name1=$_POST['name']; echo "<br> Your name is $name1 . … |
Hello, I am wondering how i would connect PHP to Microsoft Exchange? I have a form set up that when it gets submitted i want it to be emailed to a certain person the problem im having is im not sure how i would get the connection to exchange. | |
So I tried to download browscap.ini and when I find the browser it just says 'default browser'. I tried all of these: http://tempdownloads.browserscap.com/ and restarted apache but nothing happened, help? | |
How to show on my website ,content from this web page (cdkeyshere.com) i try with simple DOM code but show oonly text of liks of image i need image and text and links?How to do that please help? |
The End.