This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > July 2005 > Using DW to debug w PHP & MySQL





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Using DW to debug w PHP & MySQL
tlfeet

2005-07-31, 7:36 pm

Hi,

I have DW MX 6.1 on Mac OS X

Am trying to set up a website/web application based on http://www.pmachine.com/
It is PHP mysql based

How do I debug it, using DW?
Is it possilbe?

I mean as it runs, can I step through code, watch variable values (a debugger
like the one for javascript)?

Immediate issue is to validate some user input.
EE does do its own validation but I need to add my own and am tyring to figure
out:
a. how, where EE does it - then possibly modify
b. how, where to do my own validation before EE does

And of course make sure it works, and if not, where the error would lie.

So how can I step thru PHP/MySQL project and check variables etc?

Thanks for the help

tlfeet

2005-07-31, 7:37 pm

Hi SnakEyez,
Thanks you for the help.

Re the debugging process or not:

You hit the nail on the head:

Trace the source of the form action to the specific files in which the action
takes place on. This is where DW's folder source searching option is great.
Then add your code with their action and you are set.

A debugger that stepped through the code would aaid immensely in that process.
I this specific case I have found the particular page for EE thaat does the
validation.

I would like ot aviod picking apart a rather long, dense, detailed set of
coding ... it seems a debugger, that allows one to step through code woudl
allow me to more easily pinpoint where to insert my additional validation.
In addition, it would make it easier to figure out to do it, so as to not mess
up something that is already there.

Type of validation:
Well, the type of validations I need to do are pretty simple and would best
done as javascript.

EE does also have some javascript validation.
But before I get into that, over at EE forums, folks either know how to do
this and aren't that far yet.
I did find one post where somebody was asking what I am - but he figured it
out and took off ;) I am hoping he will come back.

The way EE works, and it is part of my problem, not sure of all its ins &
outs, quite a few pages, functions, features - so a little difficult to find
something - and modify it wihtout messing something else up.

Anyway, it is basically designed for user, e.g. me to enter "Templates, which
can contain html, php, javascript and references to other templates or EE
functions."

I have my input form, it works, but I need to add additional validation, but
the validation and javascript are sort of buried in the code.

If I add validation, say in js, well the "default" EE generated javascript is
not going to call my functions.
So in a way, does this make sense, I would have to have 2 submit - one that I
create to do my checks, and one that is generated by EE. ;)

Similarly for the server side validation - I oculd creat some PHP code to do
it.

So, obvious solution is to find wehre it does it and insert my stuff there,
but that goes back to having a way to set breakpoints and/or step through code
to find those places.

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews