eric07 Posted May 4, 2006 Share Posted May 4, 2006 I want to retrive variables from a URL which I assign to PHP variables ($_Request which I have done) - and I just want to update the set of record with this information (MySQL database) which I am having trouble with I also want it to exe as soon as the URL send this data without having to use submit button (executes straight away) and that will go back to another page.1. Is this possible and where can I find some examples. Link to comment https://forums.phpfreaks.com/topic/9085-newbie-help/ Share on other sites More sharing options...
.josh Posted May 4, 2006 Share Posted May 4, 2006 not sure i get you. what do you mean by sending the data without using the submit button? Link to comment https://forums.phpfreaks.com/topic/9085-newbie-help/#findComment-33436 Share on other sites More sharing options...
eric07 Posted May 5, 2006 Author Share Posted May 5, 2006 [!--quoteo(post=371397:date=May 4 2006, 06:12 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 4 2006, 06:12 PM) [snapback]371397[/snapback][/div][div class=\'quotemain\'][!--quotec--]not sure i get you. what do you mean by sending the data without using the submit button?[/quote]yes without the submit button - i want to update a records as soons as the page is accessed. The information that it is to be update with is sent through URL. Link to comment https://forums.phpfreaks.com/topic/9085-newbie-help/#findComment-33644 Share on other sites More sharing options...
Prismatic Posted May 5, 2006 Share Posted May 5, 2006 [!--quoteo(post=371611:date=May 5 2006, 12:14 PM:name=kim08)--][div class=\'quotetop\']QUOTE(kim08 @ May 5 2006, 12:14 PM) [snapback]371611[/snapback][/div][div class=\'quotemain\'][!--quotec--]yes without the submit button - i want to update a records as soons as the page is accessed. The information that it is to be update with is sent through URL.[/quote]This should get you going :) Not sure if the or die() will work in the if statment, if not, just remove it :)[code]<?php$Name = $_GET['name'];$Location = $_GET['location'];$Query = "UPDATE users SET location = '$Location' WHERE name = '$Name'"if(mysql_query($Query) or die(mysql_error()){ echo "Query successfully executed";}else{ echo "Query failed";}?>[/code] Link to comment https://forums.phpfreaks.com/topic/9085-newbie-help/#findComment-33646 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.