Search Results

Showing results 1 to 25 of 25
Search took 0.01 seconds.
Search: Posts Made By: pritaeas ; Forum: PHP and child forums
Forum: PHP 10 Days Ago
Replies: 7
Views: 258
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
http://www.tipstrs.com/tip/7934/Increasing-PHP-session-lifetime
Forum: PHP Oct 13th, 2009
Replies: 2
Views: 278
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
(px|em|pt|%)
Forum: PHP Oct 1st, 2009
Replies: 2
Views: 460
Posted By pritaeas
$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
Posted By pritaeas
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
Posted By pritaeas
Something like this:

RewriteRule "^photo/(.*)$" "http://www.linkzdirect.com/art/$1" [R=301,L]
Forum: PHP Sep 15th, 2009
Replies: 5
Views: 1,120
Posted By pritaeas
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
Posted By pritaeas
<?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
Posted By pritaeas
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
Posted By pritaeas
<?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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
<?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
Posted By pritaeas
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
Posted By pritaeas
Forum: PHP Jun 13th, 2008
Replies: 2
Views: 561
Posted By pritaeas
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.
Showing results 1 to 25 of 25

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC