|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Quote:
That's correct, please do that. Don't forget in the form.php to avoid the id fields to be modified. You should display them as regular text and also have it's value in a hidden input field. Let me know when we are done here, I will point you to some other stuff.
__________________
Best Regards! - Dehumanizer |
|
#17
|
||||
|
||||
|
Quote:
A reputation point would help ![]() But another thing that would help is if the user is going to be inputting text, comma's might look funny. When you use commas either MySql or PHP changes ' to \' . Use stripslashes() around the input you add to the database and take out, otherwise it'll look funny. PHP Code:
|
|
#18
|
|||
|
|||
|
Quote:
I searched the web, and found bool - so I assume if I get bool(limit), it will read the 1 0r 0 and return yes or no. That's how I thought I read it. In my display_plants.php, how do I access those 2 fields from the sql query and the loop? PHP Code:
I also changed the value of id in the form to hidden. I don't want it edited, but do want it displayed. How do i display it as "plain text"? |
|
#19
|
|||
|
|||
|
Please try this code:
PHP Code:
|
|
#20
|
|||
|
|||
|
I can make sense of what you've done there, but it now shows botanical name and common name as "yes or no".
The display.php can be viewed here These are the changes I made PHP Code:
|
|
#21
|
|||
|
|||
|
Ok, lets change the below code:
PHP Code:
To the following code: PHP Code:
|
|
#23
|
|||
|
|||
|
Yes, my mistake.
Please show me your entire display_plants1.php code. |
|
#24
|
|||
|
|||
|
Quote:
This the orginal display_plants1.php code: PHP Code:
Thanks |
|
#25
|
|||
|
|||
|
Hello, it is tested:
PHP Code:
However I don't know the name of your botanical name and size db fields. Please change accordingly. |
|
#26
|
|||
|
|||
|
Finally got access to my site (still don't know what was wrong).
That's perfect now, thanks!!! |
|
#27
|
|||
|
|||
|
In your form.php you are not showing your id. You can go two ways. If you want to display the id you can change the below code:
PHP Code:
To the following: PHP Code:
You can also opt to not have the id column at all and place the hidden value together with the common name: PHP Code:
|
|
#28
|
|||
|
|||
|
Thanks
I opted for the ID, because, unless I include all the fields in the form, whoever updates it may need to differentiate between different plants with the same common name. Thanks heaps |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > Help to create a modify form in PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|