A2xA
-
Posts
137 -
Joined
-
Last visited
Never
Posts posted by A2xA
-
-
I've made a script along with my forum register to add the same entries into a different database. In the first register file it has the variables and such that are in the handle_this function passed over to SiteRegister.php
Where then the second SiteRegister.php file inserts into a database
The first file (with variables):
//Shit that won't work $memberID = registerMember($regOptions); require_once('/x/x/x/x/x/SiteRegister.php'); handle_this($regOptions, $memberID);
Second file (SiteRegister.php):
<?php function handle_this($regOptions, $memberID) { global $db_prefix; mysql_query("INSERT INTO users (userName, userUser, userPass, UserID, userEmail) VALUES (" . $regOptions['username'] . ", " . $regOptions['username'] . ", " . $regOptions['password'] . ", " . $memberID . " " . $regOptions['email'] . ")"); } ?>
If someone could take a look at the code and tell me why it's not working I'd greatly appreciate it
-
thanks that worked. I've got a system error now :-X
I'll go patch it up.
-
I've tried a bunch of things. And all wern't working so I just ended up with that..
Now i've got:
for the register.php first file
$memberID = registerMember($regOptions); require_once('/x/x/x/x/x/SiteRegister.php'); handle_this("options", "member_id");
and..for the second file:
<?php handle_this("options", "member_id"); mysql_select_db("x"); mysql_query("INSERT INTO users (userName, userUser, userPass, UserID, userEmail) VALUES (" . $regOptions['username'] . ", " . $regOptions['username'] . ", " . $regOptions['password'] . ", " . $memberID . " " . $regOptions['email'] . ");"); ?>
It gives me this error:
Fatal error: Call to undefined function handle_this() in /x/x/x/x/x/SiteRegister.php on line 3
-
I'm trying to pass a function from one page to another..
I've go this error:
Fatal error: Cannot redeclare handle_this() (previously declared in /x/x/x/x/x/SiteRegister.php:3) in /x/x/x/x/x/Register.php on line 308
My code on the first file (that's passing it) register.php
$memberID = registerMember($regOptions); require_once('/x/x/x/x/x/SiteRegister.php'); function handle_this($regOptions, $memberID) { } { }
My Code on the 2nd page (that it's passing two) SiteRegister.php
<?php function handle_this($regOptions, $memberID) { $con = mysql_connect("x","x","x"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("x_smf", $con); mysql_query("INSERT INTO users (userName, userUser, userPass, UserID, userEmail) VALUES (" . $regOptions['username'] . ", " . $regOptions['username'] . ", " . $regOptions['password'] . ", " . $memberID . " " . $regOptions['email'] . ");"); mysql_close($con); } ?>
If someone could take a look and see what I'm doing wrong I'd greatly appreciate it!
-
I know I mean I'm trying to insert that code into my forum's registration code and I couldn't figure it out. I was just seeing if that was possible I'll play around with it some more.
Thanks for the help.
-
I've tried this and I couldn't get it to work so I was seeing if I could just do this. Cause the forum software I'm using is smf and the registration script is very complicated through different php files. I'll try and mess with it some more though.
The code I was trying to use:
<?php $name = $_POST['x']; $user = $_POST['x']; $pass = $_POST['x']; $pass_c = $_POST['x']; $email = $_POST['xl']; // Insert user into the database $query = 'INSERT INTO users (userName, userUser, userPass, userEmail) VALUES ("' . $name . '", "' . $user . '", "' . md5($pass) . '", "' . $email . '")'; mysql_query($query, $link); ?>
-
I'm integrating my 2 user systems and I need a table updated so whenever someone registers and I get an entry into the forum user table it also enters into the user table. Is this possible?
My 2 tables are in the same database.
-
alright thanks. I wasn't sure
-
I'm copying an html file with a different name for my script and it works fine. I just need it to copy when I press submit instead of when the page loads.
The copy code:
<?php $file = './x/x.html'; $newfile = "./x/x/".$rnd_id. "" .".html"; if (!copy($file, $newfile)) { echo "failed to copy $file...\n"; } ?>
My current submit button:
<input type="submit" value="Post" />
-
my bad this works Thanks!
-
I'm not posting any variables it's just in the link itself. That's why I'm not sure how to $GET the generated id?= code.
-
I'm trying to pass a variable in my linked image that says "Join Battle"
<a href="http://site.com/battle/index.php?id=' . stripslashes($row['linksLink']) . '" target="_blank"><img src="'.$site_url.'/templates/default/images/visit.png" /></a>
What will be the best way to pass the
' . stripslashes($row['linksLink']) . '
in the code to the next page?
-
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown.aspx
Is there anyway to make something like this without using the ajax toolkit in javascript or another language?
-
Could you give me an example of why they are clicking it/what you are trying to do through this? Also, are you hosted through your windows server. If so, I think this might be possible. I'm pretty sure someone isn't going to write the whole code for you though.
-
I'll try and find some. I found a code like it, but not the exact thing.
-
I'm sorry. I'll be sure to next time.
-
I'm almost positive it's JS. I'll see if I can find a script lying around somewhere with it.
-
http://www.dzinerstudio.com/index.php?PHPSESSID=eccb100bd264cac4f68d443b39e71a13&topic=121.0
You didnt make this design
Give credit to the author man.
Although the credit is at the bottom of the site, Jarose. hehe.
Credit to the author LUKE he didnt say anything about it in his post, come on msn, and he forgot to remove the copyright or w.e
What was the point of calling me Jarose?
Umm I wasn't saying I designed it and thanks for understanding luke. I didn't "Forget" To remove the copyright. They designed the core look of the theme and I edited it. So I still gave credit to the author by leaving the copyright except I edited it so I still Designed it...
Anyways... I Changed some things around. And made a new logo
Anything you guys think I could add?
-
Nevermind I got it. Thanks
-
nevermind, that's what I need. Just I don't know what function I need to define for the custom window?:
<html> <head> <script language="javascript"> // Author: Eric King Url: http://redrival.com/eak/index.shtml // This script is free to use as long as this info is left in // Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/ var win = null; function WHAT FUNCTION HERE(mypage,myname,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable' win = window.open(mypage,myname,settings) } </script> <script language="javascript"> function popUp() { day = new Date(); id = day.getTime(); var textInput = document.getElementById("urlselection").value var URL = "http://wiicharged.com/index.php?action=pm;sa=send;" window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=375,height=400') } </script> </head> <body> <div style="text-align: left;"><a href="http://wiicharged.com/index.php?action=hubs"><img style="border: 0px solid ; width: 656px; height: 125px;" alt="Wii forum friend codes" src="http://i27.tinypic.com/2n24pag.png"></a><br> <br><br> <h3>Challenge Another Member to an Online Match!<h3> <form onsubmit="popUp(); return false"> <input type=button value="Challenge!" onClick="popUp()" id="urlselection"> </form> </body> </html>
-
No, I don't need it centered I need it my custom scrolled down and heigth.
-
Okay, I have a script that makes a popup form a form. I want the popup fixed on a portion of a page. Say the middle of the page scrolled down. Automatically once the popup is opened.
Here's the script I need to edit to say that:
window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300')
is it in location?
-
okay, okay I get it. I'll make a new banner
-
thanks to both of you it's working, I appreciate it! haku you were right just I didn't define the url as little guy was saying
instead of var path i put var URL
var textInput = document.getElementById("urlselection").value var URL = "/hubchats/" + textInput + "/shout.swf" window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300') }
[SOLVED] My sql insert script isn't inserting? no errors
in PHP Coding Help
Posted
My registration page is full of requirements and security.. this is just a function it goes through when they pass through everything else. Except it's not working.