|
|
 |
| Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro PHP section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

December 15th, 2008, 06:19 AM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
code for database backup???
hello everybudy,
i am begginer in php, i hv two problems right now
1) i developing a site in which flat_no is same and i want to insert multiple member name and their blood group resp(with same flat no)....by using single textbox!
2) i wanna take backup of database!!!
can anybudy provide me the code for my problems.....
plz help me out...
Thank you.

|

December 17th, 2008, 10:56 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
multiple member ... using single textbox!
|
Example:
Input page
HTML Code:
...
<form action="savedata.php" method="post">
<textarea name="patientdata"></textarea>
<input type="submit" value="Save"/>
</form>
...
Save page
(example name: "savedata.php")
PHP Code:
<?php
// After testing, delete row below $testdata = "Barack Obama, A; Jorge Bush, AB; Bill Clinton, B";
/* Please always use a Secure Server and think's like SSL / HTTPS for Patient Data */
//HTML Form input
//temp off for single page test /* if (isset($_POST["patientdata"])){ $pdata = $_POST["patientdata"]; } else { die("Please fill field Patient Data"); }
//Your SQL injection protection //$pdata
*/
// After testing, delete row below $pdata = $testdata;
// Change explode to your own format $PatientsArray = explode(";", $testdata);
// After testing, delete row below var_dump($PatientsArray);
foreach ($PatientsArray as $key => $value) { // And so on... // $SinglePatientArray = explode(",", $value); //Your valid data test funtions // for $SinglePatientArray // After testing, delete row below var_dump($SinglePatientArray); /* $query = sprintf("mysql insert query", $SinglePatientArray[0], $SinglePatientArray[1]); mysql_query($query); */ }
?>
Quote:
|
...take backup of database...
|
http://www.phpmyadmin.net
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Database Backup |
compad |
ASP.NET 2.0 Basics |
1 |
February 5th, 2008 11:06 AM |
| backup of database |
MunishBhatia |
SQL Server 2005 |
0 |
October 5th, 2007 05:20 AM |
| Backup Database |
gaurav_jain2403 |
SQL Server 2000 |
0 |
August 3rd, 2006 01:57 AM |
| Database Backup |
ullasmathew007@yahoo.com |
General .NET |
1 |
February 17th, 2006 08:41 AM |
| Backup database |
hlchuah77 |
SQL Server 2000 |
4 |
December 5th, 2004 11:57 AM |
|
 |