I have this code here that echo's out from mysql all rows with id. Now i haave to add delete button what takes mysql row code and uses it to delete certain row in mysql. code looks like this:
well it seems to work but it wont delete the row.
It echos out the "Row deleted" but in mysql the row still exist's. Where am i wrong here?
PS! I'm quite newbie in mySQL part. This is my first script to add/remove row's in MySQL.
problem is that it will read only first half before the space. If i have written in MySQL like a centence: My name is
Then it will read out from it only: My
Name is words are not loaded. i cant figure it out.
It looks to me like there are some problems with the form you are printing out. I think some tags aren't closed properly. I'd start by looking closely at the form.
But does this cause this action:
When i write into database: Hello World. Output = Hello
When i write into database: Hello World Output= Hello World.
But i take a close look at the output code then. Maby i find something wrong...
Well i found my answer. Was reading about echo and got some idea from echo "text here $text" and echo 'text here $text'
so in my line: input name="id" type="text" size="1" value='.$row['id'].'>' i was missing "" over value=
I made it look like this: input name="id" type="text" size="1" value="'.$row['id'].'">' And voila. Write as mutch text into row. All gets read out!.
Thank's for directing to unclosed tags.
And very big thanks to Brian Swan.
Removing the * helped.
before i gave the row command: $sql = 'DELETE * FROM tellimus WHERE id='.$row['id'].''; delete *ALL from ... where id!
Now: $sql = 'DELETE FROM tellimus WHERE id='.$row['id'].''; delete row where id=
Old solution deleted too (just didn't notice it becausae i was looking wrong line). Old solution deleted only LAST line not the line where id='.$row['id'].'