Page 1 of 1

Newbie - How do I writie a variable to web with writstring

Posted: Thu Feb 09, 2012 1:50 pm
by greg_edwards
I'm new to the world of ethernet connectivity and working on my
first project leveraging the SB70LCApp example. I'm trying to write
an integer variable to the webpage and haven't been able to get writestring
to work properly. I've been successful using writestring to write static information to the webpage - [writestring( sock, " The Grounding Switch is Open <BR> <BR> \n" );] .

Is writestring the proper tool or should I be using a different method?

Thanks,

Greg

Re: Newbie - How do I writie a variable to web with writstri

Posted: Thu Feb 09, 2012 2:28 pm
by seulater
take a look in your nerburner example folder at this example and see if that is what you are looking to do.

C:\nburn\examples\Web\HtmlVariables

Re: Newbie - How do I writie a variable to web with writstri

Posted: Fri Feb 10, 2012 4:42 pm
by rnixon
writestring only writes text, and you are trying to write an integer, correct? Try using siprintf() to crate a string out of the integer, then use writestring(). Note that you need to use sprintf() if doing floats.

Re: Newbie - How do I writie a variable to web with writstri

Posted: Sat Feb 18, 2012 11:58 pm
by greg_edwards
Thanks for your help. I used siprintf() and then write() and it correctly wrote the integer variable to the web page. Mucho Gracias!

Greg