I'm trying to get a list of related articles. Example
$title = $fetch_content[article_name]; // example out put "Hello World, Ask A Question"
$rel_title = "Select * from tbl_content WHERE status='t' and article_name like '%$title' order by id desc limit 5";
How to separate the "Hello World, Ask A Question" into single keywords.
...
I need some help improving this function I made for parsing the links in a Twitter. It creates links for hashtags and @replys. It all works fine, the problem is if a hashtag or @reply has a punctuation character at the end with no space, it gets added to the HREF URL.
For example if I Tweeted "I really like #pizza, and #pop", the link f...
I'm building a simple order system and want to send an email after the form is submitted. My PHP code looks similar to this:
$name=$_POST["orderName"];
$company=$_POST["orderCompany"];
$email=$_POST["orderEmail"];
$phone=$_POST["orderPhone"];
$headers = "From: $email\r\n" .
$item1=$_POST["orderItem1"];
$qty1=$_POST["orderQty1"];
$item...
<?php
class Form_Audience extends Zend_Form_SubForm
{
public function init()
{
$this->setMethod('post');
$this->setLegend('Audience Details');
$this->addElement('text', 'audience_total', array(
'label' => 'Audience Total :',
'required' => true,
'filters' => ar...
Hello,
I am currently having an issue where MySQL is only displaying 1 of my 3 rows in a dynamic Temporary Table ive created in a PHP page. I can confirm how many rows the TmpTable has via:
$numrows = mysqli_num_rows($doResults);
// returns 3
But when I do my while($rows=mysqli_fetch_array($doResults)){ }
Only 1 of the 3 rows are re...
i look a script that do this , that can acquire an image from scanner and upload it to server
i work in LAMP environment .
i know this company:
http://www.chestysoft.com/ximage/twainupload.asp
Does anyone know free script (activeX) ?
Does anyone use a similar script ?
...
Is there a CMS that can manage content on a site without having to implement a template?
I've already designed a site with XHTML and CSS, so don't need a template, but do need active content management in static places, such as articles on the homepage and on a couple of other pages.
Preferably open-source all the way, and tableless la...
Under what circumstances would
$array[$index] = $element;
and
unset($array[$index]);
$array[$index] = $element;
be different?
Assuming I am not using any references in my array, are these logically equivalent?
...
I have two arrays which I'm trying to merge based on the date of them. Here is what the arrays look like:
$a[0][0] = '11/15/08';
$a[0][1] = '50';
$a[1][0] = '11/20/08';
$a[1][1] = '75';
$a[2][0] = '01/04/09';
$a[2][1] = '23';
$a[3][0] = '01/09/09';
$a[3][1] = '92';
and
$b[0][0] = '01/04/09';
$b[0][1] = '30';
$b[1][0] = '01/05/09';
$...
let's say I'm working on a site that has 8 to 10 different html/php templates
I want to use several common elements on every page, like most people do, masthead, footer, sidebar, the usual
but these common elements often need minor adjustments for each template, like one template has sub navigation in the sidebar and one does not
I'm ...
Does getimagesize use an extra HTTP request or can it find out the size remotely?
NOTE: The image is external
...
This produces output page OK
$mystring = "<<<EOT";
Replacing it with the following produces
Parse error: syntax error, unexpected $end in file.php on line 737
$mystring = <<<EOT
This is some PHP text.
It is completely free
I can use "double quotes"
and 'single quotes',
plus $variables too, which will
be properl...
How can I call a .Net Web Service from within php. Are there any useful libraries for php 4/5 ?
...
Hi,
i have a regular expression to remove certain parts from a URI. However it doesn't take into account multiple parts in a way that works :-). Can somebody assist?
$regex = '~/{(.*?)}\*~'
$uri = '/user/{action}/{id}*/{subAction}*';
$newuri = preg_replace($regex, '' , $uri);
//$newuri = /user/
//Should be: $newuri = /user/{action}...
I am trying to create a news ticker for a website that reads in the contents of a folder, where each file in the folder would hold a news update, and I am trying to do this without having to manually create 10 different Iframes for each individual file, and having to keep files names etc. the same.
Is this possible, and if so how is it ...
Which one is the better way to handle login in PHP?
#1 PHP.net
$email = $_POST['email'];
$password = $_POST['password'];
if($user->connection($email,$password)){ // user logging validation
session_start(); //start the session
$_SESSION['user_logged'] = true; // user logged in
header('location : ...
I'm looking to try and block access from 2 IP addresses in PHP, preferably notifying them of their blocking.
Is there anyway I can do this or is it just not possible using PHP?
I've seen a Javascript version of doing it, but if the browser has Javacript turned off, then surely they'd be able to get around it.
thanks for any advice/hel...
Hello!
I need a litle help to validate my form:
Now, i use this code to validate my form:
$(document).ready(function() {
$("#set_search").validate({
rules: {
q: {
required: true,
minlength: 2
},
q2: {
number: true
},
},
messages: {
q: "Please enter ...
I'm referring to a problem similar to the one in this post, because the solution described there doesn't work for me.
The starting point is a HTML page (called profile) with jQuery UI tabs:
<div id="tabs">
<ul>
<li><a href="#realtab">Foo Bar</a></li>
<li><a href="?cmd=changePassword" title="pwd-settings">
...
This is only a minor annoyance but if I can figure this out I'll be very happy.
Is it possible to change the default project directory in Netbeans 6.7? I don't know if it's relevant but I have the PHP Netbeans distro.
Thanks!
...