Announcement

Collapse
No announcement yet.

Problems w/ custom form in soho?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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
    02036089024 / United Kingdom
    291916438 / Australia

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

    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)


    Comment


    • #3
      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

      }

      ?>

      Comment


      • #4
        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
        02036089024 / United Kingdom
        291916438 / Australia

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

        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)


        Comment

        Working...
        X