I want to count the number of characters in a textfield on my website. The textfield accepts any type of input from a user, including ascii art and other special characters. If the user types in …
Tag: php
foreach slider only shows one db entry
I’ve got an array which gets all the testimonials from the database table and displays them via a foreach array. I want some kind of a slider which fades-in and fades-out the results. This is my query: My PHP foreach code: My piece of Javascript code It’s currently only showing ONE (the latest in …
Mockery no matching handler for closure
I can’t figure out why I’m getting this error during this test. My test appears to be matching the rest of the code exactly. What am I overlooking? In my test I have: $passwordBroker = m::mock(…
INSERT INTO two different tables, but have the same ID?
I have a database of Users and another table for Teachers. Teachers have all the properties as a user but also an e-mail address. When inserting into the DB how can I insert the info, ensuring that the ID is the same for both? the ID currently is on automatic incrament. this is what I have at the moment: than…
Overwrite subarrays in one multidimensional array if different from another multidimensional array
I stuck on this and really don’t know how to solve it. I have two multi-dimensional arrays and need to match every “entry_id” from second array with first one. Then need to check if every “file_no” from second array is in database (first array) and “status” are matche…
How can I access Unique ID in apache?
How can I access the unique_id that apache tracks for each request? I’d like to track it in any php scripts it calls as well as have it logged for each request. I remove comment on the following line from http.conf file: and I am trying to reference the ID in this simple php script: Yet this script retu…
SMTP connect() failed PHPmailer – PHP
I am new to PHP. I was trying to send myself a sample e-mail through PHPmailer. I am using gmail’s smtp server. I am trying to send a sample mail from my gmail account to my yahoo account. But I am getting the error : Mailer Error: SMTP connect() failed. Here is the code : I am using WAMP server
HTML and PHP in one file
I’m a PHP newbie trying to sort some basics out. I have a user-form that leads to a mysql select query, which works fine. Every tutorial I have found so far has the standard form tag, ie: action=’script.php’ method=’post’. This obviously opens script.php in a new tab/window thoug…
MySQL showing that select * from has internal limit 0,1000 . how to stop it
i am accesing my Mysql database server using Mysql workbench.and i have encountered a prolem. there is a table, named tags, in my database.which will have have more than thousands of tags in future.the problem is when i am executing select * from tags; query Mysql workbench is executing this (or taking action…
is_page and query_posts not working correctly
For some reason the following code is displaying both types of posts instead of just the specified post using query_posts. I am not quite sure what is going on, but it appears that the loop is ignoring my condition of is_page(‘news’) or is_page(‘othernews’). Does anyone have an idea wh…