# VB Help

This topic is 4875 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I need help Is there a way to take variables from a vb program and send it to a html file and then post that file? What i am trying to do is make this program so that a person who want to make a simple site, will just fill out a couple of questions and hit submit. When they hit submit the information will be set as variables and those variables will be selected by a html file and then saved. I want to be able to do that at least and then i can figure out how to post it on the web. Anyone have a clue as how to do something like that? I already, have written the code for the program i just need to figure out how to do the other part.

##### Share on other sites
not too sure on the subject of vb but surely theres a plugin with vb that allows you to link it with asp as there pretty much the same language... dunno im sure someone else could answer this better

##### Share on other sites
Thanks for the help although where would i look for this kind of plugin? What kind of plugin is it?

##### Share on other sites
What exactly do you mean? Do you want a program that will take input, then generate/modify an html file, then put it on a server? Or do you want to make a program that the user runs through the internet, then stores the data on a server and modifies the html file? The first one shouldn't be too hard to accomplish, but I do not think the second is possible (at least not like you probably expect)...

##### Share on other sites
I think what's wanted is:

-Take user input (ie. user selects relevent options, inputs some text or whatever)
-Output HTML file

Taking user input is simple - design a form for it, put all the information from the form in variables. This is a good stage to validate the input, to make sure that all required information is provided by the user, etc.

Next you'll need to output the HTML file - it's basically just a text file with a different extension. Most of the contents will be the same for every file, so just output standard HTML code to a file as text:

<HTML>  <HEAD>  </HEAD></HTML>

^All that stuff. Only output until you reach the point where a variable is output. At this point, you write the variable into the relevent code as well - a good example might be found within the HEAD code, where you would output the string:

'Produces a string to set the title in a HTML document, where strTitle holds the title input by the user"<TITLE>" & strTitle & "</TITLE>"

For the last stage, you'll need to upload the generated HTML file to a web-server. I can't help you there, I'm sure it could be done with VB, but I don't know how off the top of my head.

##### Share on other sites
Thanks for all your information but, i found a tutorial in which i changed according to what i wanted and it did exactly what i wanted. Although now, I have a couple more questions.

Do i need access to CGI bin in order to post files using a code that works like uploading files to a server?

Is there a free webhosting company that anyone knows of that allows FTP/CGI access?

I use homestead but i don't think they allow FTP/CGI access other than their website. What i mean is they don't allow a program to upload files, you have to do it off their website.