Results 1 to 4 of 4

Thread: Problems w/ custom form in soho?
      
   

  1. #1
    blazin202 is offline Private
    Join Date
    Jan 2008
    Posts
    4

    Default Problems w/ custom form in soho?

    hi,

    I built my own simple form (html w/ php) and inserted in one of my pages in soholaunch by the way of the custom code function in the edit page screen -

    The form shows up but my soholaunch template is MIA on that page???

    I double checked the page properties and the template is selected -

    Has anyone had success with this? Any ideas?

  2. #2
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,353

    Default Re: Problems w/ custom form in soho?

    Without a link to your page .. id say make sure your coding removes the beginning html and ending html tag, also the head and the body tags. See if that resolves the issue. It should just start with the <form> tag and end with the </form>

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  3. #3
    blazin202 is offline Private
    Join Date
    Jan 2008
    Posts
    4

    Default Re: Problems w/ custom form in soho?

    Thanks Karen - that worked -but now it issue is its not uploading image to my table - I have read issue with uploading images larger than 1mb will not work without modifying some files (to allow for larger files/images) ?

    I even have a form build w/ soholaunch w/ the file upload field and it inserted one image out of 15 trys ?

    My basic goal is just to have a form to allow a user to upload a (1) image/picture - I dont get any error messages or anything when I submit the form ?

    I inserted my code but like I said I have a soholaunch built form as well with the file upload field and it does not seem to work very well - but it looks like that was the purpose of it?


    <?php
    // code that will be executed if the form has been submitted:

    if ($submit) {

    // connect to the database
    // (you may have to adjust the hostname,username or password)

    mysql_connect ("www.xxxxx.com", "xxxxx", "xxxxx")or die(mysql_error());
    mysql_select_db("xxxxxx");

    $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));

    $result=MYSQL_QUERY("INSERT INTO UDT_TEST (description,bin_data,filename,filesize,filetype) ".
    "VALUES ('$form_description','$data','$form_data_name','$f orm_data_size','$form_data_type')");

    $id= mysql_insert_id();
    print "<p>This file has the following Database ID: <b>$id</b>";

    MYSQL_CLOSE();

    } else {

    // else show the form to submit new data:
    ?>

    <form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
    File Description:<br>
    <input type="text" name="form_description" size="40">
    <input type="hidden" name="MAX_FILE_SIZE" value="1000000">
    <br>File to upload/store in database:<br>
    <input type="file" name="form_data" size="40">
    <p><input type="submit" name="submit" value="submit">
    </form>

    <?php

    }

    ?>

  4. #4
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,353

    Default Re: Problems w/ custom form in soho?

    Blaz,

    Youll have to get Naval to look at that code. Im not a php expert, i feel qualified to screw up my own stuff but not yours. But here is where my thought is. I think you need to upload to a file/folder for the image and not a table, and then have the table populated by the PATH to this image along with your other info. Not sure how to tell u to do that. But get with Naval, i bet he can tell you for sure.

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49