i'm a code idiot and i'm on the scrounge (1 Viewer)

broken arm

New Member
Joined
Jul 9, 2003
Messages
12,083
in the past for some thesis or another I made an online questionnaire - using PHP it processed the form and emailed me the results. I'm now do some other research and would like to use an online questionnaire but have the results logged to a excel spreadsheet. I did a quick search for tutorials and only really came up with code packages that you buy.

Has anyone got a link to a simple free tutorial on how to do such a thing? including simple tutorials on setting up shit like SQL and simple databases.

Thanks a trillion,
simon
 
have few good sites at home but in training in work so cant go searching, will have a goo when i get home. check out www.mysql.com for a free open source sql database. Should have good tutorials and install guides there too. You may need apache web server as well cant remember. With the excel thing i think you can just use an INSERT INTO statement once you have an excel file set up....i think!
 
nofriendo said:
Up to you dude, it aint too hard to do but if work are paying for it why not. you may have to think about how it will integrate into the whole website!

I know I won't have too much of a problem doing that - i'm really doing this on behalf of another researcher (worldwide design study going to about 3000 people with an expected 25% response rate) here and think if he just pays for this I won't be asked to do it all the time.

but I don't want him buying some piece of rubbish that can be sourced for free elsewhere.
 
nofriendo said:
Run a search of php form on freshmeat.net, its all open source stuff think it could be useful!

nice one, i'll look into that

i most interested in having the results logged to a flatfile database (excel) but can't figure out if i need to set up SQL etc.???

and conditional forms.
 
you could dump all the results into a text file, then have a scheduled import into excel using flags. Or you could dump from php to xml and then into excel
 
egg_ said:
You can write a .csv file from php, which will open in excel. You don't need a database

If someone's gonna pay, why not pay me to do it? I work as a freelance php guy, wouldn't take very long

i'd love to but i can't explain all the difficulties that I would have to go through to get a freelancer to do this type of work for us.

aside from the 3 quotes etc. part of the core role of our organisation is to promote welsh design - so hiring an Irish designer/programmer is politically not on.

The research call would be closed by the time i got that sorted.
 
ICUH8N said:
You need 3 quotes for ~€800 of work?
f

anything over £300 pounds. - we are funded by the Welsh Assembly Government and there are controls on cash. not hash.

also the fact it's an irish designer/programmer is an issue.
 
Here's a super-simple solution, but it might help you:

In the <form> tag, set method="post" and action="xxx.php"

Then, in the same folder, make a file called xxx.php and paste in the following code:
Code:
<?php
$fhandle = fopen("yyy.csv","a");
while(list(,$value) = each($_POST))
{
   fwrite($fhandle,$value.",");
}
fclose($fhandle);
echo "Done!";
?>

What it should do is write all the values from the form into a line in yyy.csv (again in the same folder) and then print "Done!" on the screen - haven't tested it, that's just off the top of my head, any troubles with it gimme a shout. If you want to get rid of the "Done!" message you can include a file here instead, something like:
Code:
include("thanks.htm");
 
egg_ said:
Here's a super-simple solution, but it might help you:

In the <form> tag, set method="post" and action="xxx.php"

Then, in the same folder, make a file called xxx.php and paste in the following code:
Code:
<?php
$fhandle = fopen("yyy.csv","a");
while(list(,$value) = each($_POST))
{
   fwrite($fhandle,$value.",");
}
fclose($fhandle);
echo "Done!";
?>

What it should do is write all the values from the form into a line in yyy.csv (again in the same folder) and then print "Done!" on the screen - haven't tested it, that's just off the top of my head, any troubles with it gimme a shout. If you want to get rid of the "Done!" message you can include a file here instead, something like:
Code:
include("thanks.htm");

you see - now I can't even rep you.

thanks for that
 
can i hop in on this scrounging business? simple for you experts...

what would i have to do to this...

PHP:
$row['entry'] = preg_replace("/\[bold\](.+?)\[\/b\]/", "<strong>$1</strong>", $row['entry']);
...to allow line breaks to be included in the text between the [bold] and [/b]?

it'll take me weeks to figure it out meself.... thanks

(this scroll business is a bit ick)
 

Users who are viewing this thread

Warning! This thread is more than 20 years ago old.
It's likely that no further discussion is required, in which case we recommend starting a new thread. If however you feel your response is required you can still do so.

21 Day Calendar

Alasdair Roberts/Harry Gorski-Brown
The Cobblestone
77 King St N, Smithfield, Dublin, D07 TP22, Ireland
Back
Top