GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP GURU? - Quick question for you! :) (https://gfy.com/showthread.php?t=234914)

Jizar II 02-11-2004 07:34 PM

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? :helpme

ThePornPusher 02-11-2004 07:36 PM

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.

Jizar II 02-11-2004 07:46 PM

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?

Intrigue 02-11-2004 07:59 PM

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.

Jizar II 02-11-2004 08:13 PM

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?

woj 02-11-2004 09:12 PM

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

Jizar II 02-11-2004 09:18 PM

Quote:

Originally posted by woj


yes

cool! :thumbsup can you code a quick example for me? Then I'll paypal you some :2 cents:

woj 02-11-2004 09:25 PM

hit me up on icq 333.75924

Carlito 02-11-2004 09:37 PM

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.

Jizar II 02-11-2004 10:28 PM

Quote:

Originally posted by Carlito


I use this on something I just coded.

Hey thanks! I'll see if this will work :)


All times are GMT -7. The time now is 06:38 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123