p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > PHP/MySQL > Pro PHP
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 15th, 2008, 06:19 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old December 17th, 2008, 10:56 PM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
__________________

LinkItAll
Business Web Applications

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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



All times are GMT -4. The time now is 12:00 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc