Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 16th, 2005, 12:03 AM
Registered User
Join Date: Mar 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to raman1
Default Problem while inserting rows!!

Hi expertzz!!

1) I m new in PHP and Mysql. I m facing sum problems. i have make simple form in which i m inserting row in my mysql database. but the problems is, it's also storing dublicate rows, means same row are inserting in databse table 2 to 3 times while refreshing page. Now i want to check dublicate rows should not enter in database!!

2) I have make combo box which is dynamically bounded and refreshing it while selecting value(means Country combo displays related States and State displays related City) but when combo box refreshed values entered by User in above Textboxes,than values are not there means it refreshing whole page due to which values are not stored!! what will i do to Restore value while refreshing combo box. My code is

             if(!empty($country) and $country==229)
$q="select distinct us.StateCode from uscitystatezip us,country ct where us.country_id=ct.country_id and ct.country_str_long_name='united states of america' order by StateCode";
$ret=mysql_query($q, $con)or die(mysql_error());
echo "<select name=state class=font10 onChange='javascript:document.form3.submit()'>"; //Refreshing here
echo "$line1[0]";
//foreach($line as $value)
//print "<option value='$value'>$value</option>";
print "<option value='$line1[0]'" ;
if (!empty($state))
if ($line1[0] == $state)
    print "selected";

// }
print "</select>";
echo "--Select State--";


Waiting 4 ur reply!

Reply With Quote

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting multiple rows from datagrid to database ashish0512 ASP.NET 1.x and 2.0 Application Design 2 August 25th, 2012 02:09 AM
Automatically inserting rows at varied intervals Peskarik Excel VBA 0 August 14th, 2008 02:24 AM
Gridview and inserting rows thewoodchuck BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 0 April 10th, 2008 09:55 AM
Passing and Inserting mutliple rows at once SQLScott SQL Server 2005 4 February 12th, 2007 11:10 AM
creating a table and inserting rows. sasidhar79 Classic ASP Databases 2 July 28th, 2004 03:09 AM

All times are GMT -4. The time now is 06:31 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.