Hi,
I have a search text field which searches a particular column in a table, but the results are not as I expected.
When the user tries to search like "hello world how", he will not find a result as I the query is LIKE '%hello world how%'. The table row contains the string "hello world".
How do I do a proper search using php...
Possible Duplicate:
What PHP-specific questions would you ask in a job interview?
I need to interview some experienced php web developers, some of them with zend certification. Just asking them some php/mysql questions is not enough so I need to test at least the following abilities:
abstract thinking
self initiative
applica...
I need to match the following pattern:
return character
5 character string, A-Z, 0-(
space
For example:
ABC65
CG876
Each with a return character before and a space after. What regular expression should I use for this? Using PHP
...
In Zend Framework, I have a common use case where I need to propagate the same information in the top section of a view across a particular controller.
For example, if I have a "Book" controller, I want to display the summary book information at the top of the page, and have a tabbed interface below the book to display comments, detaile...
Hi guys,
I've got some PHP code that'll create a new file in a set directory:
$target_path = "reports/" . basename($Report_Filename) . ".php";
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { /* code here */ }
It was working perfectly, and has done for some years now, unfortunately we've just moved across t...
Hello,
I'm trying to use and OR statement in php 5 but it's just not working, what's wrong with this script. It's suppose to fire the error but it doesn't. If I remove the "||"(what I thought was the OR statement) it fires the error.
if($winner=="2" && $fteamscore>$steamscore){
$return['error'] = true;
$return['msg'] = 'Wrong Score, Yo...
Can this format 10-7-2010 validated with php?
With this script:
$array = explode('-', $str);
$day = $array[0];
$month = $array[1];
$year = $array[2];
$Valid = checkdate($month, $day, $year);
I have this error:
checkdate() expects parameter 2 to be long
How can I validate such format?
Thanks in advance
...
I created a wordpress module, with a single function that outputs some dynamic data. I would users to be able to call the plugin from pages. I've seen this b4 w/ the contact plugin, you create a page and just [[contact-form]] on the page. How can I do this?
Thanks :)
...
I have a form like this:
<form method="POST" action="i.php" enctype="multipart/form-data">
<input type="text" name="field1">
<input type="text" name="field2">
<input type="file" name="file">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit">
</form>
On the page I already have:
$URL = 'http://somewher...
I'm using this code to populate a Table:
<style type="text/css">
table, td
{
border-color: #600;
border-style: solid;
}
table
{
border-width: 0 0 1px 1px;
border-spacing: 0;
border-collapse: collapse;
}
td
{
margin: 0;
padding: 4px;
border-width: 1px 1px 0 0;
background-color: #FFC;
}
</style>
<tab...
i have a content stored in mysql like below:
first line
second line
third line
but when i use the echo function it shows the output like this
first line second line third line
however i want to show the output exactly as its saved in mysql.
...
I'm using PHP to pull the events from a FullCalendar as a JSON feed but I need to support multiple domains. I need a querystring variable to specify which calendar to pull events from... is this causing a problem? Here's the FullCalendar init code:
$('#full-calendar".$id."').fullCalendar({
editable: false,
events:'http://www.myd...
Hi
In Zend_Paginator
I am trying to change one of the values of the paginator object after the database result
I loop through the paginator - get the item an then sent the rank
However this is not carrying forward to the view pagination and rank is NULL
// Loop through the results and get the users Rank
foreach ($paginator as...
Hi all,
I have undertaken a small project which already evolved a current database. The application was written in php and the database was mysql.
I am rewriting the application, yet I still need to maintain the database's structure as well as data. I have received an sql dump file. When I try running it in sql server management studi...
Hello,
I'm having lots of issues with uploading videos.
If I try to use https://api-video.facebook.com I am getting a cURL host not found error, if I use http://api-video.facebook.com I get a message to use https://api-video.facebook.com
If I try to use https://api.facebook.com/restserver.php?method=video.upload I get a 101 error code...
I am hosting a site on a buddy's server. It is using MySQL, PhP and Druapl. He is complaining that it is using up all his bandwidth but for the life of me I can't figure out why. There is not image/video hosting and I believe he has ~60 GB/month. Almost all the bandwidth would be used by databases. I think the problem lies in one of the ...
I first write the JSON:
$arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);
print json_encode(array(
"array" => $arr
));
Then in the jQuery I do:
j.post("notifications.php", {}, function(data){
Now this is where I'm a little confused, as I would normally do:
data.array
To get the data, but I'm not sure how to handle the array....
I have the following link-
<a href="ex.com" onClick="return popitup2('<?php echo $var3; ?>');">Grab Coupon</a>
Where i have initialized $var3 like this
$var3 = "brand1,camp2";
The code for the function popitup2() is -
<script language="javascript" type="text/javascript">
function popitup2(id) {
$.ajax({
url: "http://jainkunal...
I use the following code to highlight a menu item if the post is in this category or the category is selected:
<a href="/category/presets/photoshop_actions" title="Only Photosshop Actions"
<?php if (is_category(photoshop_actions) || is_single() && in_category('47')) {
echo ' class="rounded rounded_active" ';}
...
First of all, I know this SHOULDN'T work. We're using a very old DAL/ORM (Pear/DB/GenericDao based) layer that incorrectly surmises that id is not an autoincrement/integer field.
This statement DOES work in 5.0 Linux, DOES NOT work in 5.1 Windows. Is there a setting that could be different in my ini (ignore_type_errors="yes":))? I ...