Saving gernerated sourcecode in sql database

Discussion in 'PHP' started by sucka, May 10, 2008.

  1. #1
    Hello,

    I do have a problem and need ur guys help.

    I´m bulding a bannerrotation and chose this method, so please don´t suggest any other :)

    I do have a form, where users can upload their picture und enter their url.

    The resulting generated sourcecode <a href .... bla bla bla should be saved into a field in my sql database.

    Didn´t find a solution yet, maybe temporarily save it somewhere?

    Thanks in advance for your help.

    Bye
     
    sucka, May 10, 2008 IP
  2. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    matthewrobertbell, May 10, 2008 IP
  3. sucka

    sucka Well-Known Member

    Messages:
    298
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Hy,

    nope.

    I just have 1 field in my table, which is called sourcecode. I don´t want to upload picture and link on my database, but the whole html sourcecode.

    U got it?

    Cya
     
    sucka, May 10, 2008 IP
  4. Nalltaroh

    Nalltaroh Peon

    Messages:
    54
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Give me what you did until now via PM.
     
    Nalltaroh, May 10, 2008 IP
  5. sucka

    sucka Well-Known Member

    Messages:
    298
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #5
    Hy,

    thanks for ur offer, but there isn´ anything I could show u.

    Isn´t much code, just the form and the script importing sourcecode into the DB, nothing more.


    Cya
     
    sucka, May 10, 2008 IP
  6. hip_hop_x

    hip_hop_x Active Member

    Messages:
    522
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #6
    
    $query=mysql_query("INSERT INTO `table` VALUES('$sourcecode_string')");
    PHP:
     
    hip_hop_x, May 10, 2008 IP
  7. sucka

    sucka Well-Known Member

    Messages:
    298
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #7

    Hy,

    thanks.

    But where do I type this and what is it for?

    And what do I type in $Sourcecode_string ?

    Bye
     
    sucka, May 11, 2008 IP
  8. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Have a look at a mysql tutorial.
     
    matthewrobertbell, May 11, 2008 IP
  9. Nalltaroh

    Nalltaroh Peon

    Messages:
    54
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Just store the generated code in a variable, and insert it into your database.

    Still, I insist... show me through PM the generator's code.
     
    Nalltaroh, May 11, 2008 IP