php-windows Digest 15 May 2007 04:37:11 -0000 Issue 3229
Topics (messages 27888 through 27899):
Re: [EMAIL PROTECTED]
27888 by: sam rumaizan
Backuping MySQL-databases
27889 by: Gustav Wiberg
27890 by: Mikael Grön
MySQL Dump
27891 by: Gustav Wiberg
27892 by: Mikael Grön
27893 by: Gustav Wiberg
27894 by: Gustav Wiberg
27895 by: Mikael Grön
27896 by: Gustav Wiberg
27897 by: Mikael Grön
27898 by: Gustav Wiberg
Re: [PHP-DB] $_POST["mypassword"]; ***Undefined index: mypassword
27899 by: bedul
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
The problem with this program is: when I click on Update The Record
onClick=\"return toggleMenu('menu1') cant find (read) the function
toggleMenu() for some reasone.
That what I get :
Object not found! The requested URL was not found on this server. The link
on the referring page seems to be wrong or outdated. Please inform the author
of that page about the error.
If you think this is a server error, please contact the webmaster.
Niel Archer <[EMAIL PROTECTED]> wrote: > I understand, but how about the
attached code? Every thing works fine except the slide menu.
It had errors in it that needed correcting. Beyond that I can't much
say. It *looks* OK, but without the missing include files it can't be
tested.
I've restructured it below. I had to make some guesses about your
intent, mostly about the include files. Hopefully I've guessed
correctly and not introduced too many errors of my own.
Note that I've moved most of the HTML outside of the PHP code, as it
does not need to be parsed. I've also standardised it as much as
possible in an attempt to make it clearer.
function toggleMenu(currMenu) {
if (document.all) {
thisMenu = eval('document.all.' + currMenu + '.style')
if (thisMenu.display == 'lock') {
thisMenu.display = 'none'
} else {
thisMenu.display = 'block'
}
return false
} else {
return true
}
}
// End hiding script -->
#menu1 {display:none; margin-left:20px}
$page_title = 'View Existing Data';
//include ('./includes/header.html');
//include( '../mysql_connect.php' );
?>
View Existing Data
" method=post>
$query = "SELECT DISTINCT Assign_Engineer FROM lo_data";
//$result = mysql_query($query);
?>
Choose a Category:while ($line = mysql_fetch_array($result)){ foreach ($line as
$value) { echo" "; }}?>
[input]
if (isset($_POST["R"])) {
$result = mysql_query("SELECT Ref_No,
Job_Title,Category,Assign_Engineer,Date_Received,Date_Required,Date_Assigned,ProjectedCompletionDate,Date_Completed,ManhourSpent,Status
FROM lo_data WHERE Assign_Engineer ='".$_POST["R"]."'");
}
?>
Reference No
Job Descriptions
Category
Assign Engineer
Date Received
Date Required
Date Assigned
Projected Completion Date
Date Completed
Manhour Spent
Status
while($row = mysql_fetch_array($result))
{
echo " ";
echo " ";
echo " {$row['Ref_No']}
\n Update The Record\n";
echo "\n Update the record [input] [input]
";
echo "\n";
echo " {$row['Job_Title']}";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo"";
}
?>
//mysql_close();
//include ('./includes/footer.html');
?>
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
--- End Message ---
--- Begin Message ---
Hi there!
Is it neccessary to lock-tables when backing up MySQL-databases? Why?
Best regards
/Gustav
--- End Message ---
--- Begin Message ---
A locked mysql database works faster.
If you use mysqldump to backup, it's locked by default. That can be
changed with arguments though.
If you use something like a PHP loop to export every table on it's own,
the risk is that one table is written to while the PHP script is
exporting another, thus leaving you with un-synced data.
That might not be a risk, depending on what your database structure is...
Mike
Gustav Wiberg skrev:
Hi there!
Is it neccessary to lock-tables when backing up MySQL-databases? Why?
Best regards
/Gustav
--- End Message ---
--- Begin Message ---
Hi!
Trying to figure out mysqldump. How would i type to making a backup of a
database with specific username and password with mysqldump?
I've tryed making a backup-schema through MySQL Administrator but there it
says... Wrong password. I've changed the password type to Obscure but it
doesn't seem to matter.
Best regards
/Gustav Wiberg
--- End Message ---
--- Begin Message ---
mysqldump -uusername -ppassword database > output.file
or
mysqldump -uusername -p database > output.file
which lets you specify the password cloaked right after you've hit enter.
Remember, no spaces between -u and the username or -p and the password.
Mike
Gustav Wiberg skrev:
Hi!
Trying to figure out mysqldump. How would i type to making a backup of a database with specific username and password with mysqldump?
I've tryed making a backup-schema through MySQL Administrator but there it says... Wrong password. I've changed the password type to Obscure but it doesn't seem to matter.
Best regards
/Gustav Wiberg
--- End Message ---
--- Begin Message ---
Hi there!
Thanx. Does this mean that I have to this on each database if I want to create
ba
-----Original Message-----
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 11:49 AM
To: 'php windows' ([EMAIL PROTECTED])
Subject: Re: [PHP-WIN] MySQL Dump
mysqldump -uusername -ppassword database > output.file
or
mysqldump -uusername -p database > output.file
which lets you specify the password cloaked right after you've hit enter.
Remember, no spaces between -u and the username or -p and the password.
Mike
Gustav Wiberg skrev:
> Hi!
>
> Trying to figure out mysqldump. How would i type to making a backup of a
> database with specific username and password with mysqldump?
>
> I've tryed making a backup-schema through MySQL Administrator but there it
> says... Wrong password. I've changed the password type to Obscure but it
> doesn't seem to matter.
>
> Best regards
> /Gustav Wiberg
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi there!
Thanx! Does this mean that I can't use option -ALL databases when using
usernames and passwords?
(I want to create a backup each night for every database we own with mysqldump)
Best regards
/Gustav Wiberg
-----Original Message-----
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 11:49 AM
To: 'php windows' ([EMAIL PROTECTED])
Subject: Re: [PHP-WIN] MySQL Dump
mysqldump -uusername -ppassword database > output.file
or
mysqldump -uusername -p database > output.file
which lets you specify the password cloaked right after you've hit enter.
Remember, no spaces between -u and the username or -p and the password.
Mike
Gustav Wiberg skrev:
> Hi!
>
> Trying to figure out mysqldump. How would i type to making a backup of a
> database with specific username and password with mysqldump?
>
> I've tryed making a backup-schema through MySQL Administrator but there it
> says... Wrong password. I've changed the password type to Obscure but it
> doesn't seem to matter.
>
> Best regards
> /Gustav Wiberg
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
mysqldump -uusername -p -A > output.file
Enter password: [password]
Done
Gustav Wiberg skrev:
Hi there!
Thanx! Does this mean that I can't use option -ALL databases when using
usernames and passwords?
(I want to create a backup each night for every database we own with mysqldump)
Best regards
/Gustav Wiberg
-----Original Message-----
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 11:49 AM
To: 'php windows' ([EMAIL PROTECTED])
Subject: Re: [PHP-WIN] MySQL Dump
mysqldump -uusername -ppassword database > output.file
or
mysqldump -uusername -p database > output.file
which lets you specify the password cloaked right after you've hit enter.
Remember, no spaces between -u and the username or -p and the password.
Mike
Gustav Wiberg skrev:
Hi!
Trying to figure out mysqldump. How would i type to making a backup of a database with specific username and password with mysqldump?
I've tryed making a backup-schema through MySQL Administrator but there it says... Wrong password. I've changed the password type to Obscure but it doesn't seem to matter.
Best regards
/Gustav Wiberg
--- End Message ---
--- Begin Message ---
Hi there!
Username and password for root (for all databases then) you mean?
/Gustav
-----Original Message-----
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 1:32 PM
To: ''php windows' ([EMAIL PROTECTED])'
Subject: Re: [PHP-WIN] MySQL Dump
mysqldump -uusername -p -A > output.file
Enter password: [password]
Done
Gustav Wiberg skrev:
> Hi there!
>
> Thanx! Does this mean that I can't use option -ALL databases when using
> usernames and passwords?
> (I want to create a backup each night for every database we own with
> mysqldump)
>
> Best regards
> /Gustav Wiberg
>
>
>
> -----Original Message-----
> From: Mikael Grön [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 14, 2007 11:49 AM
> To: 'php windows' ([EMAIL PROTECTED])
> Subject: Re: [PHP-WIN] MySQL Dump
>
> mysqldump -uusername -ppassword database > output.file
>
> or
> mysqldump -uusername -p database > output.file
> which lets you specify the password cloaked right after you've hit enter.
>
> Remember, no spaces between -u and the username or -p and the password.
>
> Mike
>
>
> Gustav Wiberg skrev:
>
>> Hi!
>>
>> Trying to figure out mysqldump. How would i type to making a backup of a
>> database with specific username and password with mysqldump?
>>
>> I've tryed making a backup-schema through MySQL Administrator but there it
>> says... Wrong password. I've changed the password type to Obscure but it
>> doesn't seem to matter.
>>
>> Best regards
>> /Gustav Wiberg
>>
>>
>>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Oh yeah, of course. :)
Mike
Gustav Wiberg skrev:
Hi there!
Username and password for root (for all databases then) you mean?
/Gustav
-----Original Message-----
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 1:32 PM
To: ''php windows' ([EMAIL PROTECTED])'
Subject: Re: [PHP-WIN] MySQL Dump
mysqldump -uusername -p -A > output.file
Enter password: [password]
Done
Gustav Wiberg skrev:
Hi there!
Thanx! Does this mean that I can't use option -ALL databases when using
usernames and passwords?
(I want to create a backup each night for every database we own with mysqldump)
Best regards
/Gustav Wiberg
-----Original Message-----
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 11:49 AM
To: 'php windows' ([EMAIL PROTECTED])
Subject: Re: [PHP-WIN] MySQL Dump
mysqldump -uusername -ppassword database > output.file
or
mysqldump -uusername -p database > output.file
which lets you specify the password cloaked right after you've hit enter.
Remember, no spaces between -u and the username or -p and the password.
Mike
Gustav Wiberg skrev:
Hi!
Trying to figure out mysqldump. How would i type to making a backup of a database with specific username and password with mysqldump?
I've tryed making a backup-schema through MySQL Administrator but there it says... Wrong password. I've changed the password type to Obscure but it doesn't seem to matter.
Best regards
/Gustav Wiberg
--- End Message ---
--- Begin Message ---
Hi!
Ok... Thanx!
Best regards
/Gustav Wiberg
-----Original Message-----
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 1:41 PM
To: ''php windows' ([EMAIL PROTECTED])'
Subject: Re: [PHP-WIN] MySQL Dump
Oh yeah, of course. :)
Mike
Gustav Wiberg skrev:
> Hi there!
>
> Username and password for root (for all databases then) you mean?
>
> /Gustav
>
>
> -----Original Message-----
> From: Mikael Grön [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 14, 2007 1:32 PM
> To: ''php windows' ([EMAIL PROTECTED])'
> Subject: Re: [PHP-WIN] MySQL Dump
>
> mysqldump -uusername -p -A > output.file
> Enter password: [password]
>
> Done
>
>
> Gustav Wiberg skrev:
>
>> Hi there!
>>
>> Thanx! Does this mean that I can't use option -ALL databases when using
>> usernames and passwords?
>> (I want to create a backup each night for every database we own with
>> mysqldump)
>>
>> Best regards
>> /Gustav Wiberg
>>
>>
>>
>> -----Original Message-----
>> From: Mikael Grön [mailto:[EMAIL PROTECTED]
>> Sent: Monday, May 14, 2007 11:49 AM
>> To: 'php windows' ([EMAIL PROTECTED])
>> Subject: Re: [PHP-WIN] MySQL Dump
>>
>> mysqldump -uusername -ppassword database > output.file
>>
>> or
>> mysqldump -uusername -p database > output.file
>> which lets you specify the password cloaked right after you've hit enter.
>>
>> Remember, no spaces between -u and the username or -p and the password.
>>
>> Mike
>>
>>
>> Gustav Wiberg skrev:
>>
>>
>>> Hi!
>>>
>>> Trying to figure out mysqldump. How would i type to making a backup of a
>>> database with specific username and password with mysqldump?
>>>
>>> I've tryed making a backup-schema through MySQL Administrator but there it
>>> says... Wrong password. I've changed the password type to Obscure but it
>>> doesn't seem to matter.
>>>
>>> Best regards
>>> /Gustav Wiberg
>>>
>>>
>>>
>>>
>>
>>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
the problem is right here (said on error msg):
session_register("myusername"); session_register("mypassword");
u should use session_register("myusername") after declare the name.
i taken from my php chm
It is currently impossible to register resource variables in a session. For
example, you cannot create a connection to a database and store the connection
id as a session variable and expect the connection to still be valid the next
time the session is restored. PHP functions that return a resource are
identified by having a return type of resource in their function definition. A
list of functions that return resources are available in the resource types
appendix.
if you understand what statement above.. conguration, if not.. don't shock.. me
either.
for phpWin.. this topic perhaps easy for you to answer.
--- End Message ---