Jump to content

jay83r

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jay83r's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ahhhh thats exactly what i was looking for! it's much simpler than using JS to show/hide rows.
  2. hey all, i have a tricky problem that i can't get my head around. i have a msql table that will populate a drop down menu, this is fine. I have another table that has a column that contains a number that i want to use to tell how many times the drop down menu should appear. for example. beach house has a drop down number of 8 (8 possible locations to place an option) - so when i display my php page showing this row (using GET) it shows 8 drop down menus from the table drop down menu (all menus are the same) eg. MENU: Window Sliding Door Entry Door i'm totally lost on how to get the 8 from the beach house row to relate to the number of drop down menus.
  3. how do i call the co-ordinates of the line from a mysql database, i want to give each line a meaniful name and then just call it to display it.
  4. does anyone know how to do an if statement in the middle of a gd image so that if a dropdown box is selected it draws different lines... <label for="height"></label> <select name="height" id="height"> <option value="2.4">2.4</option> <option value="2.7">2.7</option> </select> </form> <?php require_once('./include/connection.php'); ?> <?php header ("Content-type: image/png"); ?> <?php $x1=$_GET['x1']; $x2=$_GET['x2']; $y1=$_GET['y1']; $y2=$_GET['y2']; $im = @ImageCreate (800, 600) or die ("Cannot Initialize new GD image stream"); $background_color = ImageColorAllocate ($im, 255, 255, 255); $line_color = ImageColorAllocate ($im, 0, 0, 0); // imageline ($im,$x1,$y1,$x2,$y2,$text_color); //front base line if "height" = "2.4" imageline ($im,50,550,500,550,$line_color); else imageline ($im,50,200,500,200,$line_color); endif //front left vertical imageline ($im,50,550,50,200,$line_color); //front right vertical imageline ($im,500,550,500,200,$line_color); //bottom of apex imageline ($im,50,200,500,200,$line_color); //left roof line imageline ($im,50,200,275,100,$line_color); //right roof line imageline ($im,500,200,275,100,$line_color); ImagePng ($im); ?>
  5. i've fixed the header issue, and are able to draw a line with text, but how to i reference this to a table in a database <?php // set the HTTP header type to PNG header("Content-type: image/png"); ?> <?php header ("Content-type: image/png"); $handle = ImageCreate (640, 480) or die ("Cannot Create image"); $bg_color = ImageColorAllocate ($handle, 255, 255, 255); $txt_color = ImageColorAllocate ($handle, 0, 0, 0); $line_color = ImageColorAllocate ($handle, 0, 0, 0); ImageLine($handle, 0, 0, 200, 0, $line_color); ImageString ($handle, 8, 5, 18, "base line", $txt_color); ImagePng ($handle); ?>
  6. i've got this but i'm totally lost with it, i'm getting a header issue, and im not sure how to to do the mysql part. <?php $image = ImageCreate(200, 50); $background_color = ImageColorAllocate($image, 255, 255, 255); // white $gray = ImageColorAllocate($image, 204, 204, 204); // gray ImageFilledRectangle($image, 50, 10, 150, 40, $gray); $image = ImageCreate(200, 50); $background_color = ImageColorAllocate($image, 255, 255, 255); // white $gray = ImageColorAllocate($image, 204, 204, 204); // gray ImageFilledRectangle($image, 50, 10, 150, 40, $gray); header('Content-type: image/png'); ImagePNG($image); ?>
  7. Hi there, i want to draw dynamic lines by using ImageLine($image, 0, 0, 100, 100, $color) but i want to store the line co-ordinates in a mysql database so i can give each line a meaningful name and call them and display when I want to... anyone with anyideas?
  8. thats what i was looking into gdimage. Wasn't sure if there was something else out there.
  9. are there any resources that would point me in the right direction. i've got a decent understanding of php and sql but im not an addict.
  10. Hi there, I am building a custom configuration program, where i want people to choose various items, e.g. 1. Size of a table, colour, how many drawers, other features. I want to store all my options in mysql tables. At the end of the process I want to somehow get mysql to get line co-ordinates from a table and dynamically draw a plan view and elevation view of the table showing the options that the customer has chosen. I was wondering if anyone has ever been able to do this. I'm not sure how to start, or if php is capable of doing this. any ideas would be great.
×
×
  • 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.