Jump to content

anthonydamasco

Members
  • Posts

    92
  • Joined

  • Last visited

    Never

Everything posted by anthonydamasco

  1. Hey everyone. I have a simple php script that was working fine until my company upgraded to IE7. IE7 just shows the background and nothing else. It works on EI6, and firefox <?php $conn = mysql_connect("localhost","user","user") or die ( mysql_error() ); $db = mysql_select_db("ACCU") or die ( mysql_error() ); $search=$_POST["search"]; $result = mysql_query("SELECT * FROM phonelist"); $num = mysql_num_rows($result); if ($num == "0"){ echo "Please revise your search."; }else{ while($r=mysql_fetch_array($result)) { $phoneid=$r["idphonelist"]; $name=$r["name"]; $ext=$r["ext"]; $dept=$r["department"]; $cell=$r["cellphone"]; echo " <table width=\"515\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\"> <tr> <td><table width=\"515\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td width=\"178\">$name</td> <td width=\"40\">$ext</td> <td width=\"212\">$dept </td> <td width=\"85\">$cell</td> </tr> </table></td> </tr> </table> "; } } ?> any ideas.
  2. As much as I hate frames, maybe frames would be the best bet, or javascript
  3. i would just do this. Just have a form with a list of fruit. and when the person hits "submit" you'd do something like this. <?php $product = $_POST['producttype']; if($product =='apple'){ $category= "fruit"; } elseif($product =='carrot'){ $category= "vegetable"; } ?> this you can just insert product and category into your database. not sure if this helps. I know 2 drop downs can be done, I just don't know how.
  4. I've been trying to figure out a way to take information from a huge MySQL database and place it in fields on a PDF. The things Ive been trying at php pdflib, and a few other ways. But they are all over my head, as I am still somewhat new to php. Has anyone done this before? I need a hand! thanks!
  5. the customers server has to have a email setup for outgoing mail
  6. make sure that localhost has the right permissions. I had a similar problem. I connected to mysql through a proxy, so I had to set up user rights for both proxy.myserver.com and localhost
  7. I had alot of similar problems a few years ago. Get a new host and b4 you pay, call a sales rep and make sure they have the latest php, mysql and all that
  8. Hey, I'm looking for a script that will generate a PDF from a MySQL database.
  9. I think I have most the bugs out of my script, but its still not working... <form action="add.php" method="post" enctype="multipart/form-data" name="form1"> <input type="file" name="name"> </form> <?php $ftp_server = "myserver.net"; $ftp_user = "travis"; $ftp_pass = "dumbass"; $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); $myName = $_POST['name']; $myFile = $_FILES['file_name']; $destination_path = "/usr/home/travis/www/OEM/admin/thumbs/"; $destination_file = $destination_path."img.jpg"; $file = $myFile['tmp_name']; $upload = ftp_put($conn_id, $destination_file, $file, FTP_BINARY);// upload the file if (!$upload) {// check upload status echo "FTP upload of $destination_file has failed!"; } else { echo "Uploaded $file to $conn_id as $destination_file"; } ?> any ideas?
  10. <?php $path = "/usr/home/travis/www/OEM/admin/thumbs/"; $avar1 = "test1.txt"; $avar2 = "test2.txt"; echo copy($path.$avar1, $path.$avar2); ?> I get a blank white page.. lol I dont think it works
  11. Now im using absolute paths and I'm still having a problem
  12. gifs, BMPS, and PNGs dont work either for me, so I think its more than a browser thing I cant figure it out ><
  13. I have a script that I've been messing with and I am having trouble setting a path for images, I'm getting an upload failed response on the webserver the path is www/OEM/admin/thumbs the php page is located in the "admin" folder Ive tried both paths, I think I'm messing something up. <form action="add.php" method="post" enctype="multipart/form-data" name="form1"> <input type="file" name="userfile"> </form> <?php $path = "/thumbs/"; $max_size = 2000000; if (!isset($HTTP_POST_FILES['userfile'])) exit; if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { if ($HTTP_POST_FILES['userfile']['size']>$max_size) { echo "The file is too big<br>n"; exit; } if (($HTTP_POST_FILES['userfile']['type']=="image/gif") || ($HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/png")) { if (file_exists($path . $HTTP_POST_FILES['userfile']['name'])) { echo "The file already exists<br>n"; exit; } $res = copy($HTTP_POST_FILES['userfile']['tmp_name'], $path . $HTTP_POST_FILES['userfile']['name']); if (!$res) { echo "upload failed!<br>n"; exit; } else { echo "upload sucessful<br>n"; } echo "File Name: ".$HTTP_POST_FILES['userfile']['name']."<br>n"; echo "File Size: ".$HTTP_POST_FILES['userfile']['size']." bytes<br>n"; echo "File Type: ".$HTTP_POST_FILES['userfile']['type']."<br>n"; } else { echo "Wrong file type<br>n"; exit; } } $my_file = $HTTP_POST_FILES['userfile']['name']; ?> ERROR "upload failed!" Any one have ideas?
  14. The santax, To upload to a folder through PHP, Thats what I'm looking for
  15. I'm trying to make a form to allow the webmaster of this site to upload an image to a folder, and also insert the filename into a database along with the part number and description. So when someone searches on my engine they see the thumbnail.
  16. Hello Everyone! I've been learning PHP for a while, but I am still having trouble figuring out PHP, MySQL and images. I read up on the santax and I guess I'm just to dense. http://www.rubberduck4x4.com/OEM/ can anyone break the image process down for me, or send me a link to resources that couldnt easily be found on google. any help would be great!
  17. Well, What I'm trying to do is upload an image and rename the image. I want the name of the image to be the same as the "ID" so it will be easy to just have $ID.jpg and there is the image. Any help would be great!
  18. I have a search scripted, www2.rubberduck4x4.com/OEM/ its a simple search, and it has a simple database, partid partnumber description price catagory I want to apply images to the search, so my plan is to match the "partnumber" with the image name example Part# 1101 would be translated to 1101.jpg so all i would have to do is $partnumber.jpg So I'm looking for a script that can upload and rename the file to match the part number, The partnumber will be entered on the same form that the image is uploaded, so it seems easy. I just dont know php enough to really understand the scripts that I've read any assistance would be great
  19. ill try it, whats the differance? between if/then and switch?
  20. I seem to be having trouble throwing a var into a database $branchemail is the var not being pushed i have an if/then statement [code=php:0] if($nearestlocation =='cherryhill'){ $branchemail ="karen.hartzel@accustaffing.com"; $branchphone ="856-482-2222"; } elseif ($nearestlocation =='pennsauken'){ $branchemail ="pennsauken.office@accustaffing.com"; $branchphone ="856-662-2727"; }     elseif($nearestlocation =='burlington'){ $branchemail ="burlington.office@accustaffing.com"; $branchphone ="609-387-2900"; } elseif($nearestlocation =='woodburyheights'){ $branchemail ="woodbury.office@accustaffing.com"; $branchphone ="856-845-3900"; } elseif($nearestlocation =='atlanticcity'){ $branchemail ="ac.office@accustaffing.com"; $branchphone ="609-344-1300"; } elseif($nearestlocation =='philadelphia'){ $branchemail ="philadelphia.office@accustaffing.com"; $branchphone ="215-568-2228"; } elseif($nearestlocation =='vineland'){ $branchemail ="vineland.office@accustaffing.com"; $branchphone ="856-794-8282"; } [/code] and then i have my query [code=php:0] $sql = "INSERT INTO jobsearch VALUES (NULL, '$positiontitle', '$city', '$hourlyrate', '$workinghours', '$positiondescription', '$positiontype', '$nearestlocation', '$timeneeded', '$positionclassification', SYSDATE(), '$expire', '$branchemail', '$branchphone')"; mysql_query($sql) or die ( "Problem with the query: $sql<br>" . mysql_error() ); } [/code] everything but $branchemail goes to my database! any ideas, Ive looked at this script for ever, I just dont see it!
  21. i want a field that the staff can input what ever date they need that project to expire on
  22. As of right now my website has a "Job Search Feature" People looking for jobs can search, much like monster, or careerbuilder. Well in the back end I have small form for our staff to add jobs to the search I can't seem to come up with a working script that will expire on days set by a form. For example if I say "this job expires 12/12/2006" it will remain searchable until that time. Can anyone point me in the right direction?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.