Then make the id field auto-increment itself, by defining that behaviour when you set the table up or you can use a modify command, but back your table up first - as ever.
mytable
id - INT auto-increment
URL - VARCHAR
then you can drop the need to insert the ID, just use:
“insert into mytable (URL) values ‘$text’”
or
“insert into mytable (id, URL) values 0, ‘$text’”
or
“insert into mytable values 0, ‘$text’”
and mysql will increment the id for you automatically.
Are you sure your ID field is auto increase? I would use the first query Cups suggested. The query in your first post is not correct hence why it wont insert.