a suggestion ('add attribute' link) and a couple of questions (session_start(), db connections)

0 views
Skip to first unread message

bunnyhero

unread,
Dec 8, 2005, 6:40:50 PM12/8/05
to Php Object Generator
hi! i'm looking at POG and it looks pretty cool.

suggestion:
- the 'add attribute' link always scrolls me to the top of the page
after i click on it. this can be remedied by changing the
onclick="AddField()" attribute to onclick="AddField();return false"

questions:
- why is session_start() included in the generated configuration.php
file? i don't see any session variables in use in the rest of the
generated code.
- i notice that new DatabaseConnection objects are created in many of
the generated object methods, but i don't see the Close() method being
called on any of them. is this intentional? does php close the
connections automatically when the script ends?

thanks!

Joel

unread,
Dec 8, 2005, 6:52:49 PM12/8/05
to Php Object Generator
Hi bunny hero:
thanks for the remedy:

this can be remedied by changing the
onclick="AddField()" attribute to onclick="AddField();return false"

i'll put that in.


As for the session _start(), you can get rid of it if you don't use
sessions at all. If you use sessions in your app/webpage though, the
configuration file is the best place to put it because you always need
to include configuration.php anyways. So, it's more of a convenience
rather than a necessary feature.


>but i don't see the Close() method being
>called on any of them. is this intentional?

Yes

>does php close the
>connections automatically when the script ends?

Yes. exactly. http://ca.php.net/mysql_close

Hope that helps.
Joel

Joel

unread,
Dec 9, 2005, 2:01:01 AM12/9/05
to Php Object Generator
I've applied the return false patch. It should work properly now ;)

Thanks
Joel

Reply all
Reply to author
Forward
0 new messages