Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-11-2004, 07:34 PM   #1
Jizar II
Confirmed User
 
Industry Role:
Join Date: May 2001
Location: LLL©
Posts: 1,425
PHP GURU? - Quick question for you! :)

We need to submit some form info to a secure 3rd party server via method=POST, but we need to check up on the info in our local MySql db to make sure it?s not regged already before the info is passed on.

Is this possible?
Jizar II is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 07:36 PM   #2
ThePornPusher
Confirmed User
 
Join Date: Oct 2003
Location: Long Island,New York
Posts: 1,823
Yes, simply connect to the mysql database on the submit page, retrieve the row that you would like to see is already taken, then loop the submitted name and see if it matches up. If it does, then make a error handler, and that should solve your problem.
__________________
ThePornPusher is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 07:46 PM   #3
Jizar II
Confirmed User
 
Industry Role:
Join Date: May 2001
Location: LLL©
Posts: 1,425
Thank you for the reply Porn Pusher!

The problem is that we don't know the username we need to check before it's entered into the form and submitted to the other server?
Jizar II is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 07:59 PM   #4
Intrigue
Confirmed User
 
Join Date: Feb 2004
Location: Ohio, US
Posts: 662
this is very possible, set the forms action to your php page, on the php page, check the database, and if you still want to send it on when your done, you have two options, either send an http request to the secure server (using headers to set the post variables) or pumping out a form, and automatically submit it with some hahahahahahahahahaha. the latter is easier, but kind of a jimmy rigged way of doing it.
Intrigue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 08:13 PM   #5
Jizar II
Confirmed User
 
Industry Role:
Join Date: May 2001
Location: LLL©
Posts: 1,425
Quote:
Originally posted by Intrigue
you have two options, either send an http request to the secure server (using headers to set the post variables)
I would like to do it this way, but will the target server see this as a true POST?
Jizar II is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 09:12 PM   #6
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally posted by Jizar II


I would like to do it this way, but will the target server see this as a true POST?
yes
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 09:18 PM   #7
Jizar II
Confirmed User
 
Industry Role:
Join Date: May 2001
Location: LLL©
Posts: 1,425
Quote:
Originally posted by woj


yes
cool! can you code a quick example for me? Then I'll paypal you some
Jizar II is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 09:25 PM   #8
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
hit me up on icq 333.75924
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 09:37 PM   #9
Carlito
Confirmed User
 
Industry Role:
Join Date: Dec 2001
Location: Texas
Posts: 856
Quote:



$checkuser = "SELECT name FROM form_users WHERE name='$name'";
$query = mysql_query($checkuser);


if ( mysql_num_rows($query) >= 1 )

{


print "<font face=verdana size=1 color=#6e6e6e>Sorry, the username you have chosen is in use.<br>Please go back and create another, or get in touch with a staff member<br> to restore your current username & email.</font>";

}

else

{



$uname=escapeData($_POST['name']);
$email=escapeData($_POST['email']);
$url=escapeData($_POST['url']);
mysql_query("insert into form_users (name,email,url) values ('$name','$email','$url')");
$user_id=mysql_insert_id();
unset($_POST['name'],$_POST['email'],$_POST['url']);


I use this on something I just coded.
Carlito is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-11-2004, 10:28 PM   #10
Jizar II
Confirmed User
 
Industry Role:
Join Date: May 2001
Location: LLL©
Posts: 1,425
Quote:
Originally posted by Carlito


I use this on something I just coded.
Hey thanks! I'll see if this will work
Jizar II is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.