Forum: PHP 10 Days Ago |
| Replies: 7 Views: 258 No. The $key in this case will contain the array index.
PHP assumes
$values = array ('name','email','university','course','message');
to be this:
$values = array (0 => 'name', 1 => 'email',... |
Forum: PHP 10 Days Ago |
| Replies: 1 Views: 180 The string value is stored in a session variable, not as a hidden field in the form, as that would defeat it's purpose. |
Forum: PHP 11 Days Ago |
| Replies: 6 Views: 260 I'm guessing you're trying to install this ?
http://www.phpmydirectory.com/
Did you contact their support ? |
Forum: PHP 12 Days Ago |
| Replies: 14 Views: 409 I suggest you read this first: http://www.daniweb.com/forums/announcement124-2.html
Come up with an idea. Then, if you have problems, show us your code and explain the problem. |
Forum: PHP 12 Days Ago |
| Replies: 4 Views: 267 Try this:
<?php
mysql_connect(HOST,USER,PASS);
@mysql_select_db("db303278079") or die( "Unable to select database");
$query="select * from ".RECORDS." WHERE area='manchester' order... |
Forum: PHP 25 Days Ago |
| Replies: 2 Views: 174 It all depends on the size of the scripts and how much they influence the webpage. |
Forum: PHP 33 Days Ago |
| Replies: 8 Views: 418 Why not let the browser handle it:
<?php
echo '<a href="mailto:' . $row_master_view['email'] . '">' . $row_master_view['email'] . '</a>';
?> |
Forum: PHP Oct 23rd, 2009 |
| Replies: 4 Views: 624 If you really need to do this this way, then creating a msqli_multi_query could help. That way the server gets all queries at once, and does not need to handle each query separately.
... |
Forum: PHP Oct 13th, 2009 |
| Replies: 1 Views: 259 http://www.tipstrs.com/tip/7934/Increasing-PHP-session-lifetime |
Forum: PHP Oct 13th, 2009 |
| Replies: 2 Views: 278 Insert this at the top of both pages:
if (! session_id())
session_start();
Then you can use
$_SESSION['first'] = $_POST['first']; |
Forum: PHP Oct 8th, 2009 |
| Replies: 6 Views: 277 Check this line: header("Content-length: " . filesize( $getfile ));
Maybe filesize cannot find your file and returns 0. You may have to use $filepath instead. I think you need to output the file... |
Forum: PHP Oct 7th, 2009 |
| Replies: 8 Views: 445 |
Forum: PHP Oct 1st, 2009 |
| Replies: 2 Views: 460 $ha = fopen($filename,"r");
while ( !feof($ha) ) {
You will get the error message if the fopen fails. If you want to avoid these errors, try:
$ha = fopen($filename,"r");
if (! $ha) {
//... |
Forum: PHP Sep 22nd, 2009 |
| Replies: 5 Views: 352 I use wampserver as local development server. Typically I use PHPMailer, Smarty, jQuery, Shadowbox and Google API's. Next to that are my cms, some custom classes and image packs. |
Forum: PHP Sep 22nd, 2009 |
| Replies: 5 Views: 765 Something like this:
RewriteRule "^photo/(.*)$" "http://www.linkzdirect.com/art/$1" [R=301,L] |
Forum: PHP Sep 15th, 2009 |
| Replies: 5 Views: 1,120 According to the section "PHP Access" in http://code.google.com/apis/ajaxsearch/documentation/#The_Basics it should be possible.
My guess is you already tried this. At work we use the paid... |
Forum: PHP Jul 19th, 2009 |
| Replies: 20 Views: 1,181 <?php
if (! session_id()) {
session_start();
}
if (! isset($_SESSION['timestamp'])) {
$_SESSION['timestamp'] = time();
}
if (time() - $_SESSION['timestamp'] < 60) { |
Forum: PHP Jul 16th, 2009 |
| Replies: 6 Views: 271 RewriteRule ^www.example.com\/admin\/.* http://192.168.0.1/$1 [R=301,L]
would redirect everything starting with www.example.com/admin/ to http://192.168.0.1/ |
Forum: PHP Mar 9th, 2009 |
| Replies: 6 Views: 502 <?php
$result = mysql_query('SELECT MAX(mailer_id),email FROM mailer_directory')or exit(mysql_error());
$row = mysql_fetch_assoc($result);
echo 'the max mailer_id is ' . $row['email'];
?>... |
Forum: PHP Mar 4th, 2009 |
| Replies: 6 Views: 886 See the exec/shell_exec/system commands. If you're on Windows/IIS then you may have rights issues. Didn't get some programs running from PHP. *nix shouldnt be a problem. |
Forum: PHP Feb 26th, 2009 |
| Replies: 2 Views: 504 How about this:
print "<pre>";
$row = mysql_fetch_array($result);
while ($row) {
print 'This ID: ' . $row[0] . ' :: ';
$row = mysql_fetch_array($result);
if ($row)
print 'Next ID: ' .... |
Forum: PHP Jan 23rd, 2009 |
| Replies: 8 Views: 802 <?php
class Tag {
var $name = '';
var $attributes = array ();
var $content = array ();
function Tag($a_name) {
$this->name = $a_name;
} |
Forum: PHP Dec 4th, 2008 |
| Replies: 6 Views: 1,087 Well. It is correct, but if you want a clean separation between code and layout, I'd suggest you use templates. The html code goes into a template, with variables like title. After setting all your... |
Forum: PHP Oct 10th, 2008 |
| Replies: 2 Views: 504 |
Forum: PHP Jun 13th, 2008 |
| Replies: 2 Views: 561 type:
php defensive programming
in Google and look for the two links from php-classes.org. They'll show you some things about how to address these problems. |