Jump to content

Munch

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Munch's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks ive sorted that out now if ur interested and want to have a look its here
  2. Hi guys, I am trying to get a php script to create a table from a .txt file that contains the following text: 00001,EGBB,EHAM,0930,1010,BA46,2x,90v$ I would like to make a table that looks something like this | Flight No | From | To | ETD | ETA | Aircraft | SR | Ticket | --------------------------------------------------------------- | 00001 | EGBB| EHAM | 0930 | 1010 | BA46 | 2x | 90v$ | (The text file contains flight plan infomation from a virtual airline, this is downloaded every time a new flight plan is added then uploaded to my ftp site. this text file could end up holding 100+ lines of text) Can anyone help me out with this please? I think ive given you all the info you might need but if you need anymore infomation just ask Thanks Chris
  3. thank you very much :) its working how i wanted it to now :D
  4. This is what i have so far... [b]staff.php[/b] [code] <?php   error_reporting(0);   include ("staff.inc.php");   $name = $_GET['name'];   if ($name == null || $name == '') {     $name = "";   } $link = mysql_connect($MySQLSrv, $MySQLUser, $MySQLPass); if (!$link) {   die('Could not connect to MySQL! : ' . mysql_error()); } $db_selected = mysql_select_db($MySQLDB, $link); if (!$db_selected) {   die ('Could not find the DB : ' . mysql_error()); } if ($name != "") { $result = mysql_query("SELECT name, job, phone FROM staff WHERE name = '{$name}'"); if (!result) {   echo 'Could not run query: ' . mysql_error();   exit; } $row = mysql_fetch_row($result);   header("Content-type: image/png");   $im    = imagecreatefrompng("$pngimage");   $cBlack = imagecolorallocate($im, 0, 0, 0);   if ($name != "") {     imagestring($im, 5, 10, 10, 'Name: ' . $row[0], $cBlack);     imagestring($im, 5, 10, 30, 'Job: ' . $row[1], $cBlack);     imagestring($im, 5, 10, 50, 'Phone: ' . $row[2], $cBlack);     imagepng($im);     imagedestroy($im); }   } ?>[/code] [b]staff.inc.php[/b] [code]<?php $pngimage = "staff.png"; $MySQLSrv="localhost"; $MySQLDB="test"; $MySQLUser="root"; $MySQLPass=""; ?>[/code] i was typin this out while you were posting.. ill ready ur post now :)
  5. hi huggie, how would i display that script in a imagecreatefrompng image please? sorry to be a pain chris
  6. The only infomation that is in the database except personal infomation is the job numbers In the DB.. Name| Job | Phone john | 111 | +44 dave| 211 | +44 rich  | 311 | +44 Not in the DB 111 = Plumber 211 = Electrician 311 = Joiner I want to be able to call the infomaton from the database by http://domain.com/job.php?name=John then have the business card shown with name job title andphone number I hope this clears things up :) Chris
  7. Hi guys, Im new to php and have been working on a image that returns infomation from a mysql database, In mysql i have a list of jobs which are numbered 111, 211, 311 etc What i want to do is be able to convert those numbers into the names of the actual job and display the name in the image. Note: Editing the numbers in the database is not a option Thank you for any help that you can provide. Chris
×
×
  • 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.