Simpler programs I hope can get accross what I am looking for.
CODE
<html>
<head>
<script language="javascript">
function calc() {
var x = document.statements.y.value * 7;
var total = document.getElementById("total");
total.innerHTML = x;
}
</script>
</head>
<form name="statements">
<tr>
<td align="center>enter your age<br>
<input type="text" name="y" size="15" onclick="calc()"><br>
button onclick="calc()">clicky</button><br>
<td> In cat years you are</td>
<td><span class="result" id="total"></span></td>
</tr>
</form>
</html>
takes user input and spits output. Made it simple while still showing the elements I need.
CODE
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch;
FILE *fp;
fp=fopen("C:\\Users\\mine\\Desktop\\anothertest\\test\\extras\\run.txt", "w");
char x[10]="Fo Sho ya";
fwrite(x, sizeof(x[0]), sizeof(x)/sizeof(x[0]), fp);
fclose(fp);
fp=fopen("C:\\Users\\mine\\Desktop\\anothertest\\test\\extras\\run.txt", "r");
while (( ch = getc(fp)) != EOF)
{
printf("%c", ch);
}
fclose(fp);
}
creates a file of the text that is input. Then spits it back out.
Now assume I wanted the website page to instead take input, then send that to the server to be saved in a C database how would I do that? Also how could I send it back through C to be read by the Website?
I want to do this on my own and do not want to use PHP or MySql or any other program if I can avoid it. If anyone knows of a turorial or a text book or could tell me how to do this that would be wonderful. I know how to use a structure tree with classes and layers(If that is the correct names) to create a pretty dynamic database. I set up a password system for a 3d poker game I created which includes preferences and would now like to move into connecting my website and c skills. I have learned mostly on my own. Just really stuck here so please help.