Tweet
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    2
    Rep Power
    0

    Default very intersting Variable question

    The function calls one variable, which then needs to be placed inside other Session variables to be useful. Dig it >>
    --------



    function new_sql($object) {

    $scratch_id = get_scratch();
    $section = $object . "s";

    $sql = "INSERT INTO $_SESSION[schema_table]
    (
    user_id, scratch_id,
    entry_type,
    content_type, content_subtype, content_label,
    urlpath, pagename, section,
    title, content, content_format,
    collection_array,
    order_pref, status
    )

    VALUES

    (
    '69', '$scratch_id',
    'collection', 'article', '$object', '$_SESSION[new_{$object}_label]',
    '$_SESSION[new_{$object}_urlpath]', '$_SESSION[new_{$object}_label]', '$section',
    '$_SESSION[new_{$object}_title]', 'TO BE ADDED', 'plain',
    '$_SESSION[brand_new_collection_array]',
    'title', 'public'
    )
    ";

    mysql_query($sql) or die(mysql_error());

    } // end function




    I'm getting a parse error, for what should be obvious reasons... but do you get the gist of where I need to go with this?

    An $object = "issue" or $object = "article" something like that...
    [URL=http://www.ecommunity.com/cardiovascular/]Angioplasty[/URL]

  2. #2
    Junior Member
    Join Date
    Nov 2010
    Posts
    1
    Rep Power
    0

    Default

    Hi, Since your $sql spreads multi-lines, you may conside the HRER DOCUMENT, here is the wiki

    Here document - Wikipedia, the free encyclopedia

  3. #3
    Master Member
    Join Date
    Nov 2010
    Location
    http://hyipfactory.com
    Posts
    1,947
    Rep Power
    15

    Default

    I agree with upper

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Advertisement

Sponsors




Increase your deposit by 30%. Expand your trading opportunities. Earn more profit!