|
-
Jan 15th, 2004, 04:47 AM
#1
Thread Starter
Hyperactive Member
How to insert a value to a hidden field?[resolved]
Last edited by raladin; Mar 29th, 2014 at 10:44 PM.
-
Jan 15th, 2004, 11:47 AM
#2
Frenzied Member
use POST as your method instead of GET. Put a hidden textbox on your form and set the value equal to the HDD serial # pulled from the DB...
??? Or am I missing something? Also, make sure you validate the HDD # after it's submitted to make sure they haven't hacked it.
I didn't read the entire post, but that seems like what you want to do.
-
Jan 15th, 2004, 08:11 PM
#3
ober, you can't verify if the serial is valid or not if it hasn't already been recorded, and since he's submitting on a PHP page from a VB browser control, it means you won't be able to verify it.
now, onto the question. since your webbrowser control is hidden, you're going to need two VB textboxes in your program and one command button.. so, you could use something like this in your vb program:
VB Code:
'this example assumes that:
'your username textbox = txt_user
'your password textbox = txt_pass
'your register command button = cmd_register
'your webbrowser control = wb_browse
'the var you store the serial number in = serial
Private Sub cmd_register_Click()
Dim link
link = "http://www.yoursite.com/register.php?"
wb_browse.Navigate link & "user=" & txt_user.Text & _
"pass=" & txt_pass.Text & _
"serial=" & serial
End Sub
ok, now onto the register script.. since you can't submit that automatically through post, you're going to be using get.. also, since you said you want to hide a value on a form, well, what's the point? you shouldn't even bother, since your web browser control isn't even visible, and the user can't click a button that says register to do anything.. I suggest you rethink the way you want this setup, and find out what can and what can't do.. anyway, back to what you asked. how to hide an object on an html form and have it's value equal to that of "?serial=serial" in the vb form:
PHP Code:
<input type="hidden" name="serial" value="<?=$_GET['serial'];?>">
That will put the value of the GET request 'serial' into the hidden HTML form value 'serial'.
I advise that you instead create a PHP form that is placed into a web browser control that IS visible in your VB program, so that the user enters the username and password and presses submit, while there is a "?serial=" link that you originally go to for the user to enter the username and password. The location of the site will be recorded in the user's IE history, but unless you show the location on the form, it will not be visible to the user. I think you're going about this all wrong.. but I don't even know what you're really doing, so, whatever. This is entirely possible to do the way you want to and are right now, it just requires that you know a little about what you're doing. You could use the VB form I made and then make a register script that grabs the information to register from the $_GET var, and that will work fine.. I'm pretty much just babbling now though..
hope I helped a bit.
-
Jan 16th, 2004, 12:40 AM
#4
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:52 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|