Hi,
I am a big dummy.
I was using a form that a previous developer made for my company. I was going to adopt it and put it on our public website. It updates a machine on our network with a private IP. The form is PHP and our web server is IIS, ASP. The form talks to a machine that is really useless now, save this form.
Of course, from my desk, this form works great. My machine knows the aliases of the other computers on the network. We have no more public IP addresses.
It does work from my desk.
But not from home.
So I installed PHP on our web server thinking that if I could at least bring the form up and begin a PHP dialog from outside our network, PHP would be able to talk to our private server with the MySQL database, and it would work.
Well, it doesnt. I dont exactly know why... but it gives me a 404.
I think it has something to do with the fact that my computer at home is trying to resolve private.company.com and cannot? It shouldnt - I dont think - have to. I would think all that logic would be handled on the network and not even be visible to my machine... but Im wrong. I know.
So I am going to install MySQL on our web server alongside MSSQL. At least I can get it working this way.
I need to just code a form to use for this client intake procedure, with required fields. I cant use the existing one. It is way overkill, and calls functions that have no place in what I am doing.
Can anyone point me towards a tutorial or example that will show me how to do required fields and simple stuff like that? Please dont groan. I have looked. I have read a million simple form tutorials, but they always confuse me (most are spread over 10000 pages of adsense) and the require field validation isnt something I can pin down. I have yet to see a comprehensive, lucid, explanation.
I would appreciate a pointer toward something good.
And I am very sorry to have such a stupid question. I have been battling with this for too long.
Thank you.
Need a pointer towards instruction
Moderator: General Moderators
Thanks... so then can I...
Thank you, Sir, for your response.
Maybe someone will indulge me here:
It makes sense, then, as a temporary solution, for me to submit to my web sever and then have my web server submit to the private box.
If I have this form submit to some file on the web server, the $_POST variables are there on the web server. Can I do something tricky to take these $_POST variables and repost them to the private box?
So, $_POST variables would get posted, again.
This is a temporary solution.
There wont be any buttons getting pushed to initiate the post. Need help on that, too.
Sorry... truly I am.
Maybe someone will indulge me here:
It makes sense, then, as a temporary solution, for me to submit to my web sever and then have my web server submit to the private box.
If I have this form submit to some file on the web server, the $_POST variables are there on the web server. Can I do something tricky to take these $_POST variables and repost them to the private box?
So, $_POST variables would get posted, again.
This is a temporary solution.
There wont be any buttons getting pushed to initiate the post. Need help on that, too.
Sorry... truly I am.
Last edited by train on Tue Sep 19, 2006 8:12 am, edited 1 time in total.
Okay, this is more difficult than I hoped.feyd wrote:cURL or some other related library may be of interest.
I thought maybe I could do an include, or just resubmit everything...
Okay, I did it.train wrote:Okay, this is more difficult than I hoped.feyd wrote:cURL or some other related library may be of interest.
I thought maybe I could do an include, or just resubmit everything...
And this is my code:
Code: Select all
$ch = curl_init("http://oldserver.mycompany.com/somepage.php");
curl_setopt($ch, CURLOPT_POST); //use the POST method
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST); //take the $_POST array
and use those as the POST parameters for the curl request
curl_exec($ch); //execute the requestI get this error:
Code: Select all
on registration.php \\the form that registers client
PHP Warning: Cannot open 'C:\\Program Files\PHP\extras' for reading in Unknown on line 0
on forms/middle.php \\middle.php is the file that has the curl in it
Warning: Wrong parameter count for curl_setopt() in D:\ULEM WebSite\forms\middle.php on line 5
Message was not sent \\I think I have the right number of parameters...
Please tell the Administrator: Mailer Error: Could not instantiate mail function.PHP Warning: Cannot open 'C:\\Program Files\PHP\extras' for reading in Unknown on line 0 \\not sure why mail is being called... it doesnt mail a thing...