| | |
Need help in PHP???
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
Hi All,
I am making an application in PHP using ajax as i dicussed in my last forums about multiple select boxes . Now the problem is coming that my application is running well . Let me explain whole of this:
Like i have made one application for country , state and city. When we select country from list which i am fetching from database after that selecting country list of states will present and after selecting state list of cities will present. This all is running well. But now when i am submitting all selected values in database now the problem is that i am getting not complete value of city or state.
Like i am passing value of city or state is " Los Angales" or " NEW YORK" but in database this after submitting this it is showing first word like this " Los " in place of "Los Angeles " and it should show " NEW YORK " but it is showing only " NEW " .
But i want to show whole value in my database after submitting these value . Is there any function in PHP with which i can show whole values ?
Please Help me.
Thanks,
Gagan
I am making an application in PHP using ajax as i dicussed in my last forums about multiple select boxes . Now the problem is coming that my application is running well . Let me explain whole of this:
Like i have made one application for country , state and city. When we select country from list which i am fetching from database after that selecting country list of states will present and after selecting state list of cities will present. This all is running well. But now when i am submitting all selected values in database now the problem is that i am getting not complete value of city or state.
Like i am passing value of city or state is " Los Angales" or " NEW YORK" but in database this after submitting this it is showing first word like this " Los " in place of "Los Angeles " and it should show " NEW YORK " but it is showing only " NEW " .
But i want to show whole value in my database after submitting these value . Is there any function in PHP with which i can show whole values ?
Please Help me.
Thanks,
Gagan
Last edited by gagan22; Jun 6th, 2009 at 3:02 am.
•
•
Join Date: Jan 2009
Posts: 13
Reputation:
Solved Threads: 2
Hey, you are right, i don't know which way you are putting in page with all the menu.
All the state and city menu is not consider each other. so might be a problem in menu set up.
-----------------------------------
<URLs SNIPPED>
All the state and city menu is not consider each other. so might be a problem in menu set up.
-----------------------------------
<URLs SNIPPED>
Last edited by peter_budo; Jun 6th, 2009 at 3:45 am. Reason: Keep It On The Site - Do not manually post "fake" signatures in your posts.
-------------------------------------
Web Design Company Texas & web design Dallas
" We never know the worth of water till the well is dry."
Web Design Company Texas & web design Dallas
" We never know the worth of water till the well is dry."
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
•
•
•
•
If you print_r() on $_POST or $_GET, depending on the form method that you are using, are the full values being passed to the page?
Thanks for reply,,
form method post i am using. and i am passing value like this.
php Syntax (Toggle Plain Text)
echo " <select name=state>"; echo "<option value='$row[statename]'>$row[statename]</option>"; echo " </select>";
Like state name have name "NEW YORK" . As it is showing in form when i am selecting this value and submitting form with value $_POST[state] . But in databse this is showing just " NEW " but this should insert " NEW YORK" . This point is confusing me.
please help me . how i can solve this.
thanks
Last edited by peter_budo; Jun 6th, 2009 at 3:44 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
•
•
Join Date: Jun 2009
Posts: 21
Reputation:
Solved Threads: 3
try
php Syntax (Toggle Plain Text)
echo "<option value='" . urlencode($row['statename']) . "'>" . $row['statename'] . "</option>";
Last edited by Baldy76; Jun 6th, 2009 at 3:27 am.
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
•
•
•
•
try
php Syntax (Toggle Plain Text)
echo "<option value='" . urlencode($row['statename']) . "'>" . $row['statename'] . "</option>";
thanks for reply,
when i am using this code as you suggest me . I am able to show whole value now . But this is showing + sign in both of these word.
Like NEW+YORK in database . But i want to show this should show like this NEW YORK means there should come space between these both words.
How i can insert space in between both of these word. Please help me to solve this issue also.
Thanks for so much help.
•
•
Join Date: Jun 2009
Posts: 21
Reputation:
Solved Threads: 3
in your query, use
php Syntax (Toggle Plain Text)
$query = "insert into blah blah blah values('" . urldecode($_POST['selectname']) . "')";
Last edited by Baldy76; Jun 6th, 2009 at 3:47 am.
•
•
Join Date: Feb 2009
Posts: 130
Reputation:
Solved Threads: 0
•
•
•
•
in your query, use
php Syntax (Toggle Plain Text)
$query = "insert into blah blah blah values('" . urldecode($_POST['selectname']) . "')";
Thanks for giving so much time .
I have solved this. Now value is going very well as i need it.
Thanks sir.............
![]() |
Similar Threads
- Project available for PHP Developer (Web Development Job Offers)
- PHP/MySQL Programmer Position (Web Development Job Offers)
- Are you a PHP and Javascript junkie? It's time you met Emma. (Software Development Job Offers)
- PHP MYSQL Developer Position Available (Web Development Job Offers)
- PHP Web Programmer (Post your Resume)
- PHP / My SQL Web developer (Web Development Job Offers)
Other Threads in the PHP Forum
- Previous Thread: NEED help please - Parse error
- Next Thread: fetch_assoc and fetch_object problem
| Thread Tools | Search this Thread |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube





