Jump to content

kurumi

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kurumi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=369281:date=Apr 27 2006, 04:56 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Apr 27 2006, 04:56 PM) [snapback]369281[/snapback][/div][div class=\'quotemain\'][!--quotec--] Of course its possible... whats the problem your having? [/quote] The problem is that if a lot of users use the script at the same time ,the database will get mixed up!Their own output will become inaccurate.So is there any solution to this problem?
  2. Hi alls, I have some php scripts which will get the user input,put into the database and output rearranged datas.At the moment ,only one user can use it .And it will be impossible if a lot of users use it at the same time.I wonder that there is anyway i can do to get a lot of users use it at the same time with their own input?
  3. Oh,i got it...Thanks so much!You are so intelligent!It is very nice to meet you!
  4. i am trying to understand the script you gave ...but it seems to be that there is a problem with the id array... Sorry if i can ask what do mean by [code]   foreach ($_POST['address'] as $editID => $newadd) [/code]
  5. Hi alls, I have a db table like the following : id company address 1 A USA 2 B UK 3 C Canada And i am using two following script to display and edit the records display.php [code] <?php // Make a MySQL Connection mysql_connect("localhost", "ota", "pass") or die(mysql_error()); mysql_select_db("order") or die(mysql_error()); // Get all the data from the "calendar" table $result = mysql_query("SELECT id,company,address from calendar ORDER BY id ASC") or die(mysql_error()); echo "<form action='edit.php' method='POST'>"; echo "<div align='center'>"; echo "<table border='1'>"; echo "<tr> <th>Id</th> <th>Company</th> <th>Address</th></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; //echo "</td><td>"; echo "<input type='text' value='$row[id]'>"; echo "</td><td>"; echo "<input type='text' value='$row[company]'>"; echo "</td><td>"; echo "<input type='text' value='$row[address]'>"; echo "</td></tr>"; } echo "</table>"; echo "</div>"; echo "<br>"; echo "<div align='center'>"; echo "<input type='submit' value='Save changes!'>"; echo "</div>"; echo "</form>"; ?> [/code] edit.php [code] <?php $connect=mysql_connect("localhost","ota","pass"); mysql_select_db("order",$connect); $sql="UPDATE calendar SET address ='$_POST[$row[address]' WHERE id = '$_GET[$row[id]'"; $result=mysql_query ($sql,$connect); echo $result; ?> [/code] As you can see i use $_POST to get the data from display.php and update the records in edit.php but somehow it doesn't work.So i wonder if you could point out my mistakes and help me please?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.