Moron Posted November 22, 2006 Share Posted November 22, 2006 My code:[code]<?phpheader('Content-Type: image/jpeg');$data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl'. 'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr'. 'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r'. '8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg==';$data = base64_decode($data);$im = imagecreatefromstring($data);if($im !== false) imagejpeg($im);else echo 'An error occurred.';?><?php session_start();$_SESSION['empcode'] = $empcode;$_SESSION['middle'] = $middle;$_SESSION['firstname'] = $firstname;$_SESSION['lastname'] = $lastname;$_SESSION['leavehours'] = $leavehours;?><?php//CONNECTION STATEMENT. Can also be plugged into an .inc file, then just refer to the .inc file.$conn = mssql_connect("ORSERVI","USERNAME","PASSWORD") or die ("Could Not Connect to Database.<br>Please Notify Computer Services.");mssql_select_db('PerMaster',$conn);?><?php$RESULTDS=mssql_query("SELECT DISTINCT LH.[Employee Number], M2.[HRYRAT], M2.[EMPNO], M2.[MANLAP], M2.[PAYCTR], M2.[MANLAC], M2.[MANLTC], M2.[MSKLAB], M2.[MSKLTC], M2.[NAMEMI], M2.[NAMEL], M2.[NAMEF], EH.[DATE], EH.[ENETPA], LH.[LOCC], EH.[EGRSER], EH.[EREGHR], EH.[EDEDUC], EH.[EROTHR], EH.[EFWHD], EH.[EPEDAT], EH.[ESSDED], EH.[EHOSPD], EH.[ELIFED], EH.[ECRUD], M2.[POSITN], M2.[MCTDWH], M2.[MHDATE], M2.[MCTDCS], M2.[MO3TOT], M2.[MCTDLD], M2.[MCTDGE], M2.[MALPPP], M2.[MSLPPP], M2.[MWHSTA], M2.[MWHALL], M2.[MWHADD], EH.[EGARND], EP.[EMPNO], DP.[EMPNO], EI.[DDEPTN], EI.[NEWOCC], EI.[HRYRAT], EI.[MEMPAD], EI.[MEMPCS], EI.[MEMPZI], view_EmployeeInfo.[EmpPicture]FROM LEAVHST LH JOIN MASTERL2 M2 ON LH.[Employee Number]=M2.EMPNO JOIN EARNHIST EHON EH.[EEMPNO]=M2.EMPNO JOIN EMPPICTURE EPON EP.[EMPNO]=EH.EEMPNO JOIN Departments DPON DP.[EMPNO]=EP.EMPNO JOIN View_EmployeeInfo EION EI.[EMPNO]=M2.EMPNOWHERE M2.[EMPNO] = '".$_POST['employeenumber']."' and M2.[MSSNO] = '".$_POST['password']."' ORDER BY EH.[DATE] desc"); $RESULT=mssql_fetch_assoc($RESULTDS) or die("<CENTER><img src=\"http://orserva/images/invalidnumber.gif\"></CENTER><BR><CENTER><table width=60 //border=0><tr><td><font size=\"3\" color=\"#000000\" face=\"arial\">Need help? Here is an example entry:</font></td></tr><tr><td align=center><img //src=\"http://orserva/images/leaveexample.gif\"></td></tr><tr><td><font size=\"3\" color=\"#000000\" //face=\"arial\">Enter your Employee Number<BR>Enter your password (Social Security Number)<BR>Click Submit<BR><BR>If you're still having difficulty, click here to </font><font size=\"3\" color=\"#ff0000\" //face=\"arial\"><BR><a href=\"mailto:[email protected]? subject=Problem with the Pay Stubs On Demand //System\"><b>E-mail the HelpDesk</b></a></font></td></tr></table></CENTER>");?>[/code]Since the "header" line has to be at the top for this image code to work, how can I use the $RESULT[EmpPicture] as my variable for the image to be displayed? Link to comment https://forums.phpfreaks.com/topic/28121-gd-library-help-with-variable-please/ Share on other sites More sharing options...
Moron Posted November 22, 2006 Author Share Posted November 22, 2006 Bump. Anybody?(tumbleweed blows by.....) Link to comment https://forums.phpfreaks.com/topic/28121-gd-library-help-with-variable-please/#findComment-128813 Share on other sites More sharing options...
JasonLewis Posted November 23, 2006 Share Posted November 23, 2006 just place the query under the header then, couldnt u? Link to comment https://forums.phpfreaks.com/topic/28121-gd-library-help-with-variable-please/#findComment-129058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.