Jump to content

A2xA

Members
  • Posts

    137
  • Joined

  • Last visited

    Never

Posts posted by A2xA

  1. 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

  2. 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

  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!  :)

  4. 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);
    ?>

  5. 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" />

  6. 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  :P

     

    Anything you guys think I could add?

  7. 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>

  8. 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')
    }

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.