Results 1 to 11 of 11

Thread: Alright PHP gurus, question about something

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Question Alright PHP gurus, question about something

    I have this PHP code that connects to MySQL and it works fine except for the picture. This is the form used to execute the PHP code (attached) www.alamotrades.com/post.html

    The picture and all information gets sent to the database without problems but I get this error after I submit...

    WHAT IS IT TRYING TO OPEN? '/export/home/d60244618/public_html/images/content/7192006teq.jpg'
    What is this location? I want the pics to be stored on alamotrades.com/images/content I think I have this written wrong..

    See the attached PHP code that might help you out some...

    Here is the error:
    Warning: imagejpeg() [function.imagejpeg]: Unable to open '/export/home/d60244618/public_html/images/content/7192006teq.jpg' for writing in /mnt/w0200/d41/s14/b0284c62/www/php-lib/imageupload.php on line 64

    Warning: Cannot modify header information - headers already sent by (output started at /mnt/w0200/d41/s14/b0284c62/www/php-lib/imageupload.php:64) in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 85
    Attached Files Attached Files

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Alright PHP gurus, question about something

    Post the uploadtheimg() function.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Alright PHP gurus, question about something

    Quote Originally Posted by penagate
    Post the uploadtheimg() function.
    Here it is...Thanks!
    Attached Files Attached Files

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Alright PHP gurus, question about something

    Ok I have figured out that problem by myself by digging around, but I have still one left before perfection.
    Now the only problem I have is the printcat.php calling the information out of the database back to the page. Will you help me out with it?? This is what I put in one of the pages to call upon the function:

    PHP Code:
    PHP Code:
    <?php
    include("php-lib/printcat.php");
    printcat("Real Estate>For Rent"$thelimit"realestate_for_rent.html");
    ?>
    Here is the is the printcat.php attached...
    Attached Files Attached Files

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Alright PHP gurus, question about something

    What should I be looking for? What's the problem?

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Alright PHP gurus, question about something

    Quote Originally Posted by vonoventwin
    Ok I have figured out that problem by myself by digging around, but I have still one left before perfection.
    Now the only problem I have is the printcat.php calling the information out of the database back to the page. Will you help me out with it?? This is what I put in one of the pages to call upon the function:

    PHP Code:
    PHP Code:
    <?php
    include("php-lib/printcat.php");
    printcat("Real Estate>For Rent"$thelimit"realestate_for_rent.html");
    ?>
    Here is the is the printcat.php attached...
    This is the problem... I have stuff in the MySQL database but my PHP script (printcat.php) isn't calling it to the page http://alamotrades.com/realestate_for_sale.html

  7. #7
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Alright PHP gurus, question about something

    After each call to mysql_query(), place the following line:
    PHP Code:
    if (!is_resource($sql_cat)) {
      echo 
    mysql_error();
      exit();

    (Replace $sql_cat with the name of the query result variable).

    Also, place the following line at the top of the script
    PHP Code:
    error_reporting(E_ALL E_STRICT); 
    I can't help much more as I don't know the DB structure.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Alright PHP gurus, question about something

    Thanks but i'm scared to mess with it too much as this code was working fine about 2 years ago when i used it.

  9. #9
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Alright PHP gurus, question about something

    Well it's messy code anyway. The structure is not good, large sections of code are repeated, the layout is bad... etc. If it doesn't work, which doesn't surprise me, and you are not prepared to "mess with it", then it will never work. Do you see what I mean?

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Alright PHP gurus, question about something

    ok I will give it a try among some other things folks suggested and post back my findings..Thanks again!

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Alright PHP gurus, question about something

    if anyone would rewrite this code and get it working I would owe you so much. please...

Posting Permissions

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



Click Here to Expand Forum to Full Width