Page 1 of 1

Few ideas/queries

Posted: Fri Feb 27, 2009 4:14 am
by welshy
Hi all, first post!

I'm new to developing in PHP, as I usually work in VB/C++/ASM. I am working on a new project that's proving to be a bit of a challenge. I'll try and describe what help I need without giving too much away.

I want to run a webserver on a Windows box. Clients will be able to log into my web-based customer portal (which I've already roughly finished) and fill out a form (a series of editboxes and radio check boxes) to select an ammount of options. Now, what I want to do (although not sure if it's even possible) is edit the C++/ASM source files with the data they've inputted directly from PHP, compile from command line and then show them a download link with the compiled file. I hope I made that clear, as I've confused myself a little bit now.

Also, I'm wondering if anyone knew of a reliable way of allowing C++ to interact with MySQL databases, as in comparing values or checking for access allowance etc. I'd like to try this sort of method as a registration system that'll be serverside.

If I need to supply any more information, I'll gladly tell. This is really starting to annoy me now!

Thanks

Re: Few ideas/queries

Posted: Fri Feb 27, 2009 7:16 pm
by mickeyunderscore
Well I'm not well versed in c++/ASM compilation, but if it's achievable from the command line, then it should be achievable from PHP. I've never used c++/ASM from PHP, but I have executed Java command line applications with success so I'm sure this is doable.

You can use the backtick characters which will execute commands: ``, or perhaps try the shell_exec() function: http://uk.php.net/shell_exec

As for editing the c++/ASM source code files, you should be able to use the fopen() function: http://uk.php.net/fopen, this will allow you to write to/read from the files.

I've no idea about using c++ to interact with a MySQL database, sorry.