Thank you zorgi and Dormilich for taking the time out to reply; I really apppreciate it.
I've been such a dimwit about the problem. Though my database is on the same machine, I gave the IP address of my machine in mysql_connect() instead of using NULL, or localhost or 127.0.0.1. I used localhost and now it work's just fine :)
Dormilich, I have named my table something else and not table. I wrote it so over here just to illustrate...
User Profile
Collapse
-
PHP script not recognising mysql database
Hello all,
I have written a simple PHP script that connects to a MySQL database and retrieves a record from a table. However, my script stop swith an error: 'Table yourdatabase.ta ble does not exist', whereas it does!
I see the table when I execute 'show tables;' and also when I 'desc' it. I can also run select queries on it from within the MySQL command line. But somehow, the php script fails to. It connects to the database... -
Yes, which is what I'm doing effectively. Thank you very much for taking time out to reply to my query.
Trupti...Leave a comment:
-
Yes, instead of disabling based on value in "value", which would not send the myElement on form submit, I thought I could make it readOnly.
Since according to you I cannot set it to readOnly like that, what I tried was to set it to disabled, but again enable it just before form submit. This ensured that the value of myElement was submitted. Not an optimum solution, but it works.
Do you have any other ideas?...Leave a comment:
-
Hello,
I'm sorry; its actually 'equipment', but because I didn't want to confuse anyone, I decided to substitute it with 'myForm'. Evidently, I skipped it in one place.
Let us take the name to be 'myForm'. I'm re-writing my above code snippet here:
Code:if (value == "Ordered" || value == "Planned") { document.myForm.myElement.readOnly = false; }
Leave a comment:
-
Sending disabled form elements
Hello all,
I am stuck with my problem, and being a JS novice, I need your help. I'd appreciate it if anyone could.
I have a page, in which depending on value selected from dropdown-1 (for example), I need to disable or enable few other elements in the page.
I then need to send all these values via form submit to another page. Problem is, I discovered that disabled elements cannot be sent via form submits.... -
Thank you, I will do that :) Thank you all for taking time out to respond to my query.Leave a comment:
-
<Dormilich>
it would only be sensible, if the total content is not too much (because you have to supply all the data for the combo boxes along with the page load).
</Dormilich>
Thank you. That is what I was thinking too, if I'm only going to use js and html AND want to be on same page.
In which case, it is about 4200 records. (Is that a lot?) If yes, then is Ajax my only hope? :(Leave a comment:
-
I see... is there anyway to do it with js and html? I don't know Ajax and I'm guessing it'll take me time to understand it and write code for my scenario.Leave a comment:
-
-
Show/hide and update combo box
Hello all,
I have a situation and I'd appreciate it if any of you could help me. I am not sure if this is js or html but here goes. I have a main combo box (mcb) which I'm displaying some values.
Based on what the user chooses, 2 combo boxes should be displayed on same page. The first combo box (CB1), should be filled with some values. The second, (CB2) however, should get loaded on basis of what is chosen in CB1. UNtil... -
Gits,
Yes it is a reload of values chosen the first time around. I have a way of passing the values from page to page; whats missing is how to get to display the values previously chosen in the dynamically added rows. And yes, when I come back to the page, I have the values. I just need a way of displaying them.
When adding rows dynamically for the first time, if you see the code, I have used setAttribute to set the...Leave a comment:
-
Hello Mark,
Thanks for your reply. No I don't mean the browser's back button. I have buttons on my page to move back and forward.
- TruptiLeave a comment:
-
Help with dynamic rows in table
Hello all,
I have a question and I'd be glad if any of you could help me :) I have written code to add rows dynamically to an existing table. When the user first comes to the page, there are 2 rows in the table already. If he so wishes, he can add additional rows. Whilst creating the rows, I have set the 'id' and 'onchange' attributes.
Now when he comes back to this page after going forward 1 page, the table is not loading...
No activity results to display
Show More
Leave a comment: