Jump to content

jbegreen

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by jbegreen

  1. Hey can anyone help me.

     

    Im trying to pass some for variables to an EOD statement as a confirmation slash profile preview page. However when i try to insert the variables surrounded with the standard <? ?> tags i get a message about unexpected white space.

     

    here is the end o0f my processing script and the confirmation EOD which is echoes at the end of the script.

     

     

      GetSQLValueString($insert_upload1, "text"),
      GetSQLValueString($insert_upload2, "text"),
      GetSQLValueString($insert_upload3, "text"),
      GetSQLValueString($insert_upload4, "text"),
      GetSQLValueString($insert_upload5, "text"));
     
      mysql_select_db($database_w2w, $w2w);
      $Result1 = mysql_query($insertSQL, $w2w) or die(mysql_error());  }
    ?>
    <?
      $confirmation = <<<EOD
     
    // I WANT TO INSERT VARIABLES HERE FROM $_POST TO DISPLAY THEIR INFORMATION AFTER REGISTRATION AS A SORT OF PREVIEW PAGE
    // THIS IS WHAT I HAVE TRIED
     
    $password_entry = $_POST['password_entry'];
    $business_name = $_POST['business_name'];
    $address1 = $_POST['address1'];
    $address2 = $_POST['address2'];
    $address3 = $_POST['address3'];
    $postcode = $_POST['postcode'];
    $email = $_POST['email'];
    $website = $_POST['website'];
    $facebook = $_POST['facebook'];
    $twitter = $_POST['twitter'];
    $linkedin = $_POST['linkedin'];
    $openfrom1 = $_POST['openfrom1'];
    $openfrom2 = $_POST['openfrom2'];
    $openfrom3 = $_POST['openfrom3'];
    $openfrom4 = $_POST['openfrom4'];
    $openfrom5 = $_POST['openfrom5'];
    $openfrom6 = $_POST['openfrom6'];
    $openfrom7 = $_POST['openfrom7'];
    $opento1 = $_POST['opento1'];
    $opento2 = $_POST['opento2'];
    $opento3 = $_POST['opento3'];
    $opento4 = $_POST['opento4'];
    $opento5 = $_POST['opento5'];
    $opento6 = $_POST['opento6'];
    $opento7 = $_POST['opento7'];
    $business_description = $_POST['business_description'];
    $managers_message = $_POST['managers_message'];
     
    echo $username_entry; ?>
     
     
    <head>
     
     
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Registration complete! Thank you.</title>
    <style type="text/css">
    but it seems i am unable to do this. Can anybody shed some light? Im sure its something silly. :) Thanks
     

     

  2. Hi Guys

     

    Can anyone help me with this

     

     

    <?php require_once('Connections/w2w.php'); ?>
     
    <?
     
    $username_entry = 'jack';
     
    $query = mysql_query ("SELECT * FROM ofnissenisub321 WHERE username = $username_entry ");
    $rows = mysql_fetch_array($query);
     
    $username = $rows['username'];
    $password = $rows['password'];
    $business_name = $rows['business_name'];
    $address1 = $rows['address1'];
    $address2 = $rows['address2'];
    $address3 = $rows['address3'];
    $postcode = $rows['postcode'];
    $email = $rows['email'];
    $website = $rows['website'];
    $facebook = $rows['facebook'];
    $twitter = $rows['twitter'];
    $linkedin = $rows['linkedin'];
    $openfrom1 = $rows['openfrom1'];
    $openfrom2 = $rows['openfrom2'];
    $openfrom3 = $rows['openfrom3'];
    $openfrom4 = $rows['openfrom4'];
    $openfrom5 = $rows['openfrom5'];
    $openfrom6 = $rows['openfrom6'];
    $openfrom7 = $rows['openfrom7'];
    $opento1 = $rows['opento1'];
    $opento2 = $rows['opento2'];
    $opento3 = $rows['opento3'];
    $opento4 = $rows['opento4'];
    $opento5 = $rows['opento5'];
    $opento6 = $rows['opento6'];
    $opento7 = $rows['opento7'];
    $business_type = $rows['business_type'];
    $business_description = $rows['business_description'];
    $managers_message = $rows['managers_message'];
    $image1 = $rows['image1'];
    $image2 = $rows['image2'];
    $image3 = $rows['image3'];
    $image4 = $rows['image4'];
    $image5 = $rows['image5'];
     
    echo "$password";
     
     
    ?>
     
     
    I get the following error Warning mysql_fetch_array is not a valid SQL result resource at........
     
     
    Why is this happening??
     
    Hope somebody can help
     
     
    Thanks :)

     

  3. Hey Guys,

     

    I have an Array Count On file uploads (Upto 5 Files) Called Upload[0];

     

    Is this right to use an individual filename from the array as a variable?

     

    $image_upload1 = $_POST['upload'[0];

     

    As i want to use is in this...

     

    $insert_upload1 = "user_images/$username_entry/$image_upload1";

     

    As $insert_upload1 is the variable for an INSERT value on my Database.

     

    I think its something in the display of the 'upload[ ]  array.

     

    Can anyone shed any light :)

     

     

    Thanks

     

     

  4. Array(    [upload] => Array        (            [name] => Array                (                    [0] => test.jpg                    [1] => facebook_cover_small copy.jpg                    [2] =>                     [3] =>                     [4] =>                 )            [type] => Array                (                    [0] => image/jpeg                    [1] => image/jpeg                    [2] =>                     [3] =>                     [4] =>                 )            [tmp_name] => Array                (                    [0] => C:\WINDOWS\Temp\php93B.tmp                    [1] => C:\WINDOWS\Temp\php93C.tmp                    [2] =>                     [3] =>                     [4] =>                 )            [error] => Array                (                    [0] => 0                    [1] => 0                    [2] => 4                    [3] => 4                    [4] => 4                )            [size] => Array                (                    [0] => 595377                    [1] => 60665                    [2] => 0                    [3] => 0                    [4] => 0                )        ))

    There are 5 files possible to upload. Used 2 to demonstrate print r.

     

    Thanks for your help. :)

  5. Hey :) Wondered if anyone could help me with this. I had this right a couple of days ago but for some reason it wasn't in my code yesterday and since rebuilding, has ceased to work.

     

    I have a multi file upload that creates a directory as the name of the username variable ($username_entry).

     

    When using this variable in the file path along with the variable for the name of the file ($name) the file path simply puts the variable text "$name" as some random blank file within the newly created directory.

     

    Im sure it something pretty small that needs editing to use 2 variables in 1 path.

     

     

    Anyway here's the code i need tweaking. Thanks to anyone that can help me :)

     

     

    <?php
     
    if (isset($_FILES['upload']) === true) {
    $files = $_FILES['upload'];
     
     
    for($x = 0; $x < count($files['name']); $x++) {
    $name = $files['name'][$x];
    $tmp_name = $files['tmp_name'][$x];
     
    move_uploaded_file($tmp_name, 'user_images/'.$username_entry.'/ . $name');
     
    }
     
    ?>
     
    Its the move_uploaded_file($tmp_name, 'user_images/'.$username_entry.'/ . $name'); where i think the problem lies.......any takers?
     
     
    Thanks. :)
×
×
  • 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.