elhelaly1999 Posted July 24, 2008 Share Posted July 24, 2008 Hi , Can I send variable to page without submit form or send it with URL ? Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/ Share on other sites More sharing options...
MasterACE14 Posted July 24, 2008 Share Posted July 24, 2008 you can send via URL like so... <a href="page.php?name=bob>bob</a>" then retrieve it like so... <?php if(isset($_GET['name']) && !empty($_GET['name'])) { echo $_GET['name']; // prints "bob" } ?> you can submit a hidden form to another page, using javascript also... Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598395 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 thanx MasterACE14 But as I write above I don't want URL or forms Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598402 Share on other sites More sharing options...
MasterACE14 Posted July 24, 2008 Share Posted July 24, 2008 you can use session variables then. Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598408 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 thanx a lot But this page which I want send variable to it on another server so I can't use session or cookies Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598415 Share on other sites More sharing options...
MasterACE14 Posted July 24, 2008 Share Posted July 24, 2008 then you'll have to use a form or GET method :-\ Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598417 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598424 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 Is there any suggestion else ? Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598465 Share on other sites More sharing options...
unkwntech Posted July 24, 2008 Share Posted July 24, 2008 Sometimes where there is no answer, it's because the question was wrong. There are 4 ways to take data from one page to another: GET POST SESSION DATABASE Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598477 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 OK I will say that my question is wrong and I will explain my problem But I want to get data from Database this database in another server and I don't want to make connect to this DB from my server but I want to send a request to this other server with variable to connect to the DB and get the data this my problem and I hope u understand my problem Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598498 Share on other sites More sharing options...
samshel Posted July 24, 2008 Share Posted July 24, 2008 do you have access to the "another" server ? if yes and if you dont want to use - direct db connection - GET - POST - SESSSION then i think you can go for using Web Services. Create a SOAP server on "another" server, Create a SOAP client on your server and access the data Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598501 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 thanx samshel I tried to make it web service but there are several issues so I try to make it with another way But It seems that not working thanx for every body Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598517 Share on other sites More sharing options...
Entanio Posted July 24, 2008 Share Posted July 24, 2008 You can post a form automatically through PHP. That is PHP does it when the user opens the page and no-one has to press a submit button. Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598520 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 Thanx Entanio But variables will appears to every body and these variables sensitive data Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598528 Share on other sites More sharing options...
elhelaly1999 Posted July 24, 2008 Author Share Posted July 24, 2008 Can I send with Get or POST without notify the user ? Link to comment https://forums.phpfreaks.com/topic/116375-send-variable/#findComment-598593 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.