Insert this at the top of both pages:
[code=php]
if (! session_id())
session_start();
[/code]

Then you can use
[code=php]
$_SESSION['first'] = $_POST['first'];
[/code]
in the second file. In the first file you can use:
[code=php]
if (isset($_SESSION['first']))
// first name was set by second page, you can use it
[/code]

Try it on paper. Write the values down. Then change them as you walk through each loop (in your head).

pong

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 contents too, so put that code back in.

(px|em|pt|%)

[code=php]
$ha = fopen($filename,"r");
while ( !feof($ha) ) {
[/code]

You will get the error message if the fopen fails. If you want to avoid these errors, try:
[code=php]
$ha = fopen($filename,"r");
if (! $ha) {
// could not open stream
}
else
while ( !feof($ha) ) {
[/code]

If it worked before, then something has changed, a php upgrade, a change in the ini settings, firewall or proxy not allowing to connect...

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.

krisfr commented: Thanks, I thougt no one reading the post +3

Something like this:

RewriteRule "^photo/(.*)$" "http://www.linkzdirect.com/art/$1" [R=301,L]

wickedsunny commented: great help :) +1

According to the section "PHP Access" in [url]http://code.google.com/apis/ajaxsearch/documentation/#The_Basics[/url] it should be possible.

My guess is you already tried this. At work we use the paid version of google search, which just returns xml.

cwarn23 commented: excellent reply in short time. +6
iamthwee commented: nice +23

"Virginity can be cured !"
-- Unknown

"If it is not source, it is not software"
-- NASA

[code=php]
<?php
if (! session_id()) {
session_start();
}

if (! isset($_SESSION['timestamp'])) {
    $_SESSION['timestamp'] = time();
}

if (time() - $_SESSION['timestamp']  < 60)  {
    $_SESSION['timestamp'] = time();
    echo "More time added "; //to see if it works
}
else {
    mysql_query("UPDATE user SET onoffstatus = 'Offline' WHERE username = '$userfinal'");
    session_unset();               # Session_unset and Session_destroy
    session_destroy();             # Will remove all sessions.
    header("location: index.php"); # This code will send you back to the index page
}

?>
[/code]

Toxikr3 commented: Thank you, very much. +1

if you already have your data in an array then you can built it.
[code=php]
$start = $_GET['page']; // yourlink.php?page=0
$items = 5;
for ($i = $start $items; $i < ($start ($items + 1)); $i++) {
// output your $array[$i]
}
[/code]

RewriteRule ^[url]www.example.com\/admin\/.*[/url] http://192.168.0.1/$1 [R=301,L]

would redirect everything starting with [url]www.example.com/admin/[/url] to [url]http://192.168.0.1/[/url]

diafol commented: I appreciate the insight- cheers +3

Doesnt matter. I can understand your frustration. Create a table containing a blob field (not varbinary, my mistake). Then you can insert data in the table. I made a screenshot so you can see:

[url]http://pritaeas.info/DaniWeb/Screenshot/DatabaseCPanel.png[/url]

Spunky commented: Very helpful. +1

Not entirely sure what you mean. Do you want to print a part of what is shown on the screen ? Then you could use CSS to define what to show when you want to print. If this is not it, please provide an example.

[code=php]
<?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'];
?>
[/code]

or:

[code=php]
<?php
$result = mysql_query('SELECT email FROM mailer_directory ORDER BY mailer_id DESC LIMIT 1')or exit(mysql_error());
$row = mysql_fetch_assoc($result);
echo 'the max mailer_id is ' . $row['email'];
?>
[/code]

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.

How about this:

[code=php]
print "

";
$row = mysql_fetch_array($result);
while ($row) {
print 'This ID: ' . $row[0] . ' :: ';
$row = mysql_fetch_array($result);
if ($row)
print 'Next ID: ' . $row[0] . '
';
}
print "
"; }
[/code]
nav33n commented: This is much simpler than what I thought! :) +10

[code=php]
<?php
class Tag {
var $name = '';
var $attributes = array ();
var $content = array ();

    function Tag($a_name) {
        $this->name = $a_name;
    }

    function AddAttribute($a_key, $a_value) {
        $this->attributes[$a_key] = $a_value;
    }

    function AddContent($a_content) {
        $this->content[] = $a_content;
    }

    function ToString() {
        $retval = '';
        $retval = '<' . $this->name . ' ';

        foreach ($this->attributes as $key => $value) {
            $retval .= $key . '="' . $value . '" ';
        }
        $retval .= '>'; 

        foreach ($this->content as $mixed) {
            if (is_string($mixed)) {
                $retval .= $mixed;
            }
            else if (is_object($mixed)) {
                $retval .= $mixed->ToString();
            }
        }

        $retval .= '</' . $this->name . '>';
        return $retval;
    }
}

$html = new Tag('html');

$head = new Tag('head');

$title = new Tag('title');
$title->AddContent('OOP Example');

$head->AddContent($title);
$html->AddContent($head);

$body = new Tag('body');
$body->AddAttribute('text', '#800000');
$body->AddAttribute('bgcolor', '#F0FFF0');
$body->AddContent('This is a test');
$html->AddContent($body);

echo $html->ToString();

?>
[/code]

sacarias40 commented: nice post thanks +1

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 vars, you output the template. Nice and clean. (smarty.net)

peter_budo commented: Nice found +12

Changes are it's in Python, because most of Google Apps is also in Python.

FlashCreations commented: Thanks for the Help! +1

[QUOTE=Venom Rush;709495]The value of Joe won't be overwritten with Suzy will it?[/QUOTE]

Correct.

It's all here: [url]http://nl2.php.net/mysql_fetch_assoc[/url]

[code]
$sql = "SELECT DISTINCT year(date) AS 'year' FROM news ";
$result = mysql_query($sql);

while ($row = mysql_fetch_assoc($result)) {
echo '

' . $row['year'] . '

';
}
[/code]
rickya100 commented: Great help. Solved problem. Thanks +1

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.

peter_budo commented: Interesting suggestion +8

Create a html form like this:
[code]


[/code]

search.php
[code]
<?php
$search = "%" . $_POST["search"] . "%";

mysql_connect ("localhost", "myuser", "mypassword");
mysql_select_db ("mydatabase");

$query = "SELECT mycolumn FROM mytable WHERE mycolumn LIKE '$search'";
$result = mysql_query ($query);
if ($result) {
while ($row = mysql_fetch_array ($result)) {
echo $row[0] . "
";
}
}
?>
[/code]

I was speeding down the highway when I suddenly see a police car behind me, so I speed up. After a while, unable to get rid of him I pull over. When he's beside the car he says: "Well, I've stopped a hell of a lot of speeding drivers today and I am about to go home. Give me a very good excuse, and I'll let you go." "Well", I say, "My wife left me recently for a policeman, I thought you were bringing her back!."