The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

using pretty standard code, but because the code is broken into many lines the shockwave does'nt like it and seems to prefer if it could send it all in one line, so thats my first problem.

my second is, in the coldfusion (mentioned above) article it talks of calling a page that excecutes the code, i've never done this in php is it possible to put the connection code in a .php script and simply call the script from another .php code with one line?

i'd also appreciate people letting me know if anybody knows of any articles or documentation that covers this kind of thing?

Sorry that I am not answering your main question here, but does this code actually work as intended?

if ($con==NULL)

If it does then I am disapointed at PHP for being too flexible and forgiving. This is illogical. You cannot compare a value to NULL for equality. NULL is synonymous with "unknown" and it is impossible to compare something against something else that is of an unknown value. I'm almost sure that this will not work as intended. You are better off using the is_null() function for testing for null. http://www.php.net/manual/en/function.is-null.php

In any case, you should also be aware that mysql_connect will return FALSE if a connection is not made:

for testing whether the connection failed is no problem anyway in the php, but doing this in the shockwave it seems to execute but returns nothing, at least so far the shockwave doe'nt fall over which indicates what i am doing is not wrong shockwave side, just does'nt succeed in connecting.

the thing is from shockwave you need to send a command in this format....

when result = 1 the script has worked, so what i need to do is figure out how i can make a php file (execute.php) which will execute when i call it.

so at the moment i would like to be able to test all in php, having one script call the execute.php and pass it any variables it needs to work with at the same time yet include does'nt give this oportunity? is there a command like call or something that does this in php?

Hi, just on the if($con == NULL) thing again, your code may well work as intended for when their is a connection in place (the normal course of events), but if you were to test it for the case that the conection was not made, I think you will find that it will not enter the if path as you intend it to. Anyway, enough.