Jump to content

inferium

Members
  • Posts

    58
  • Joined

  • Last visited

    Never

Everything posted by inferium

  1. Hi there, PHP noob here. I want to make a form with multiple fields, which their individual values will be placed on a specific location of a template image. The purpose is so that I can have multiple of the same image, but with different text values on it. What functions should I learn to make this happen? Thanks
  2. Ah sweet, this is something like what I was looking for. I found what I think is maybe a more relevant to what I want to do at http://scriptplayground.com/tutorials/php/Text-On-Image/ But I want to do this through forms. How would I make a form write to a certain part of the image?
  3. Could somebody point me to a good tutorial on Image Editing/Generation in PHP? What I want to do is take a simple template image and add text to it in certain areas, but do this through a form process. Thanks a bunch!!!
  4. Ah, good call thank you! I went in and changed the permissions and it all works fine now
  5. So I have a php application hosted at http://1minloans.com/roman2/index.php that is supposed to show what is created at http://1minloans.com/roman2/admin/form.php . This one works fine, but when I made a database for the same application in other directories, the images either don't show up on the finished product or they are not being uploaded. An example of this can be found at http://1minloans.com/createflyer/az/index.php and http://1minloans.com/createflyer/az/admin/form.php Is there something I need to do in the separate databases to make the images show up?
  6. Ok, I've tried multiple ways of inserting this code and it either makes the whole page go blank or I just get the text of <A HREF="asfhla"> Any ideas?
  7. Ah yes, the file is a .php extension. Basically, I'm trying to display the tables that show up when I use the following code (which is the actual sourcecode of http://1minloans.com/roman2/index.php <?php include('common/dbconnect.php'); $theID = $_POST['cID']; if($theID != '') { $sql = mysql_query("SELECT * FROM tblcars WHERE cID = $theID"); $row = mysql_fetch_array($sql); $cbody = $row['cbody']; $sql3 = mysql_query("SELECT btype FROM tblbody WHERE bID = $cbody"); $row3 = mysql_fetch_array($sql3); $cdrive = $row['cdrive']; $sql4 = mysql_query("SELECT dtype FROM tbldrive WHERE dID = $cdrive"); $row4 = mysql_fetch_array($sql4); } echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Car Website</title> <link rel="stylesheet" href="common/style.css" type="text/css" /> </head> <body> <form name="choosecar" action="index.php" method="post"> <div>Choose Vehicle: <select class="txtselect" name="cID">'; $sql2 = mysql_query("SELECT * FROM tblcars"); $numrows2 = mysql_num_rows($sql2); if ($numrows2 == 0) { echo '<option value="">No Vehicles</option>'; } else { echo '<option value="">Choose Vehicle</option>'; while($row2 = mysql_fetch_array($sql2)) { echo '<option ' . ($row['cID']==$row2['cID'] ? 'selected' : '') . ' value="'.$row2['cID'].'">'.$row2['ctitle'].'</option>'; } } echo '</select> <input class="subbtn" type="submit" name="submit" value="Submit" /></div> </form>'; if($theID != '') { echo '<table style="width: 760; height: 759px" bgcolor="grey"> <tr> <td border="1"> <A HREF="http://eliteautoweb.com/apply2.html" TARGET="_blank"><IMG SRC="http://i428.photobucket.com/albums/qq2/onebigredfish/eliteautoweb.gif" BORDER="0"></A> <table style="width: 650px; height: 600px" BORDER="0" align="center"> <tr> <td BGCOLOR="black" ALIGN="center" style="height: 13px; width: 288px"><FONT COLOR="white"><b>'.$row['ctitle'].'</b></FONT></td> <td BGCOLOR="black" ALIGN="center" style="height: 13px" class="style29"><FONT COLOR="white"><strong>'.$row['cslogan'].'</strong></FONT></td> </tr> <tr> <td style="width: 288px; height: 212px" BGCOLOR="black" BORDER="1" VALIGN="middle">'; if($row['cphoto'] == '') { echo '<img src="images/nophoto.gif" />'; } elseif($row['cphoto'] != '') { echo '<img src="images/cars/'.$row['cphoto'].'" style="height: 210px;" />'; } echo '</td><td style="height: 212px" VALIGN="top" BGCOLOR="black"> <table style="width: 100%; height: 254px"> <tr> <td style="height: 8px" BGCOLOR="black" ALIGN="center"><FONT COLOR="white"><strong>Location: '.$row['clocation'].'</strong></FONT></td> </tr> <tr> <td valign="top" align="center" BGCOLOR="grey" style="height: 240px"><big><FONT COLOR="white">Features:</FONT></big> <table style="width: 100%; height: 173px" class="style20" BGCOLOR="black"> <tr> <td style="width: 120px"><FONT COLOR="white"><b>Make:</b></td> <td><FONT COLOR="white"><b>'.$row['cmake'].'</b></FONT></td> </tr> <tr> <td style="width: 120px"><FONT COLOR="white"><b>Year:</b></td> <td><FONT COLOR="white"><b>'.$row['cyear'].'</b></FONT></td> </tr> <tr> <td style="width: 120px"><FONT COLOR="white"><b>Model:</td> <td><FONT COLOR="white"><b>'.$row['cmodel'].'</b></td> </tr> <tr> <td style="width: 120px"><FONT COLOR="white"><b>Body Style:</td> <td><FONT COLOR="white"><b>'.$row3['btype'].'</b></td> </tr> <tr class="style4"> <td style="width: 120px"><FONT COLOR="white"><b>Exterior Color:</td> <td><FONT COLOR="white"><b>'.$row['cextcol'].'</b></td> </tr> <tr class="style4"> <td style="width: 120px"><FONT COLOR="white"><b>Interior Color:</td> <td><FONT COLOR="white"><b>'.$row['cintcol'].'</b></td> </tr> <tr class="style4"> <td style="width: 120px; height: 22px;"><FONT COLOR="white"><b>Condition:</td> <td style="height: 22px"><FONT COLOR="white"><b>'.$row['ccondition'].'</b></td> </tr> <tr> <td style="width: 120px; height: 7px;"><FONT COLOR="white"><b>Drive Type:</td> <td style="height: 7px"><FONT COLOR="white"><b>'.$row4['dtype'].'</b></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td width="288" height="223" valign="top" BGCOLOR="black"> <table WIDTH="105%" height="320" BGCOLOR="black" BORDER="0"> <tr> <td style="height: 1px; width: 147px" ALIGN="center"><FONT COLOR="white"><big>Asking Price: </big><b><big>'.$row['cprice'].'</big></b></FONT></td> </tr> <tr> <td valign="top"> <table width="100%" height="100%" BGCOLOR="white"> <tr> <td style="height: 18px"><FONT COLOR="black"><B><U>Contact Information:</U></B></FONT></td> </tr> <tr> <td valign="top" HEIGHT="100%"><B>'.$row['caddress'].'</B><br /><FONT COLOR="black"><B>Phone: '.$row['cphone'].'</B></FONT><br /><br /><a href="http://eliteautoweb.com/apply2.html" target="_blank"><img src="http://i428.photobucket.com/albums/qq2/onebigredfish/elitesmall.gif" BORDER="0"></a> </td> </tr> </table> <br /><br /><br /> </td> </tr> </table> </td> <td height="223" VALIGN="top"> <table width="100%" height="320" BGCOLOR="black" VALIGN="top" BORDER="0"> <tr> <td HEIGHT="1" align="center" VALIGN="top"><FONT COLOR="white"><b>Attributes</b></FONT></td> </tr> <tr VALIGN="top"> <td valign="top" VALIGN="top" style="height: 292px" BGCOLOR="white"><b>Exterior:</b> <table style="width: 100%" VALIGN="top"> <tr> <td bgcolor="#C0C0C0"><small>'.$row['cext'].'</small></td> </tr> </table> <br /> <b>Electronics:</b> <table style="width: 100%"> <tr> <td bgcolor="#C0C0C0"><small>'.$row['celec'].'</small></td> </tr> </table> <br /><b>Accessories:</span></b> <table style="width: 100%"> <tr> <td bgcolor="#C0C0C0"><small>'.$row['caccess'].'</small></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table>'; } echo '</body> </html>'; ?>
  8. Hmm, I'm not quite grasping this. So in order to make ^that^ code work, how would I put it on the form? Because when I put it on there a minute ago, it just came up as the <a href... line.
  9. How would I go about displaying the html code of a page on the page? For example, let's say I wanted to take one of the selections on the dropdown menu at http://1minloans.com/roman2/index.php, and have a box somewhere on the page that shows the complete HTML of what is displayed in said dropdown. From what I've read, I understand that you would do this through htmlentities, but since I'm a major noob to PHP (this is pretty much my first ever PHP project), I'm not quite grasping this concept. Any help would be much appreciated
  10. Ah great! Thank you guys so much, this is really helpful
  11. Sweet deal So I'm guessing there is no way to have the address sent as a part of the application? Having a unique IP for each of our clients is the main goal I am trying to accomplish.
  12. Hello, PHP n00blet here (though I'm starting to understand the language a bit better as of late). My boss wants me to be able to capture our clients' IP address in our online application here: http://apply.eliteautoweb.com. The form is made in html, as I don't know how to do PHP forms yet. So far in my searching, I've found the following snippet of code: <? $logged_string = "$REMOTE_ADDR|" . date("j M Y g:i a"); $file = fopen("userIP.log", "a"); fputs($file, $logged_string, strlen($logged_string)); fclose($file); ?> Is there a way that I can capture an IP address within the form using this code, or is there another more efficient way to capture IP? Thanks
  13. Let's say that this is an actually good illustration. I want to take a piece of displayed html and have the code for it layed out in a text box at the bottom of the page (I'm finding it hard to describe this in words so this paint image is the best I can do, sorry guys !!! ) Would this be a php maneuver, or is this done through other means?
  14. Alrighty, I've got some more info on this if you guys could use it to help me. I've got full read/write access enabled on all folders in the directory, but images aren't being uploaded into the folder where they are supposed to go. When I look in phpmyadmin, they are listed under tblcars -> cphoto. But, that's the only place I ever see them referenced. I think the problem may be that for some reason they aren't being uploaded onto the server. Any ideas?
  15. When I press "Add Car" at the bottom of the first link, that car should show up on the list at http://1minloans.com/roman2/index.php But it's not showing up
  16. I hate to be a bother on these boards (the dropdown menu problem was pretty tough but so simple to solve). Now I'm having one last problem with my script. For one, I had somebody else build it for me but they left out small details for me to figure out. I'm pretty much php illiterate, but I'm starting to grasp the concepts. Basically, the problem is this: this link right here (when the form is filled out all the way) https://1minloans.com/roman2/admin/form.php should feed listings into the dropdown menu at https://1minloans.com/roman2/index.php and the entire source for this script is in a .rar file at https://1minloans.com/roman2.rar The guy who made this for me tested it on his server and everything worked just fine. Is there an option in phpmyadmin that needs to be enabled that I just have overlooked? Any help with this would be much appreciated!
  17. I figured it out! I just had to rename some values in the dbconnect file that was referenced in the beginning of the php file. Now I'm having troubles with the uploading of image files (they aren't going in), but at least the error is gone! Thanks guys!!!
  18. I'm pretty sure I did When I try to import it again, I get this: Error SQL query: -- -- Database: `dbcars` -- -- -------------------------------------------------------- -- -- Table structure for table `tblbody` -- CREATE TABLE `tblbody` ( `bID` int( 11 ) NOT NULL AUTO_INCREMENT , `btype` varchar( 60 ) NOT NULL , PRIMARY KEY ( `bID` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =7; MySQL said: Documentation #1050 - Table 'tblbody' already exists
  19. OK, so I've imported that file through phpmyadmin, and the values still aren't showing up. Is there a specific area where I should import them to? I'll try messing with it some more and see if maybe I overlooked something.
  20. Ah, thanks! I'll try messing with it and see if I can get it to work
  21. Hmm... That's really informative, thanks Though, I'm not finding anything anywhere that uses the name tblbody Would this be something I need to create do you think?
  22. Hey everyone, PHP n00b here. Here's my problem: A couple of months ago, I had someone build a basic script for me, and it won't work for me because it incorporates dropdown menus which he left for me to fill. My understanding of PHP is horrible (I've been trying to learn, but I learn with baby-steps). So anyways, we try to run this script and apparently it won't work until the dropdown menus have been populated with data. So, is there a good tutorial out there that will help me fill these in? I simply just don't know where to begin to look. Thanks everyone! https://1minloans.com/roman2/admin/form.php and the entire source for this script is in a .rar file at https://1minloans.com/roman2.rar
  23. Because I'm a noob and the guy who helped me build it told me it was back when I had a problem with it on my local server (not the webserver I want to run the script on). However, I've lost all his contact info and don't remember who it was
  24. Nevermind, I was just being stupid for a second. I ran the scripts above and it says GD is enabled, but I am still having trouble running this script on my server though (it's been tested on other servers and works just fine) The script hosted on my server is located at http://1minloans.com/roman2/admin/form.php When I fill out the form, the only trouble I have is when I press the submit button the image upload gets an error. "Error: please fill in all fields" (name of image) I've uploaded a .rar of the script to the server at www.1minloans.com/carscript.rar Do you guys have any ideas? Thank you so much for your help!
×
×
  • 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.