Jump to content

sseeley

Members
  • Posts

    85
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

sseeley's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. I am hoping that someone can help me. I have installed PEAR onto my Godaddy account, but I am not getting any luck when I am trying to get working. I have a really simply file to begin testing. <?php include ('/PEAR/Mail.php'); ?> When I run the file I get the following errors. Warning: include(/PEAR/Mail.php) [function.include]: failed to open stream: No such file or directory in /home/content/97/5783497/html/emailTest.php on line 2 Warning: include() [function.include]: Failed opening '/PEAR/Mail.php' for inclusion (include_path='.:/usr/local/php5/lib/php:./PEAR') in /home/content/97/5783497/html/emailTest.php on line 2 PEAR is installed into /PEAR/ My PHP5.ini file has the following. cgi.fix_pathinfo = 1 include_path = .:/usr/local/php5/lib/php:./PEAR SMTP = relay-hosting.secureserver.net smtp_port = 25 Can any one suggest any help I would be really grateful. Regards Stuart
  2. I hope someone can help with a small query I have. I have a text file with a number of values within. The values are held on the line below a criterion I can search for. With PHP I can search for the text and display the line number, for example 254. I now cannot see how I can lookin a text file and say echo or print line 255? Can anyone help with this at all? Much appreciate any comments from anyone. Thanks Stuart
  3. Please can you help, I have a really easy query but cannot get past this error message. SELECT cadetId, lastName, firstName FROM ( SELECT tblcadets.pkCadetId AS cadetId, tblcadets.lastName AS lastName, tblcadets.firstName AS firstName FROM tblcadets AS tblcadets ) thanks for any help you can give me.
  4. Hi I hope someone can help me. I am trying to post a form on the selection of a check box. I am using the following code, but I get JavaScript errors in IE and Chrome. echo "<form action='page2.php' method='POST' name='myform'>"; echo "<input type='checkbox' name='this_Box' value='test' onclick='submitform()'>"; echo "</form>"; ?> <script type="text/javascript"> function submitform() { document.forms["myform"].submit(); } </script> <?php Many thanks in advance Stuart
  5. Thanks for your help, this worked fine.
  6. <form action = 'addxxx.php' method = 'POST' name = 'addYearDivisor' onsubmit = 'confirmSubmit()'>
  7. Have tried this modification but the form still submits?
  8. Hello, can anyone help me with this Javascript? When I click cancel it still submits the form? function confirmSubmit() { var r=confirm("Please confirm you have updated the divisors correctly"); if (r==true) { submitOK = "true"; } else { submitOK = "false"; } if (submitOK == "false") { return false; } }
  9. I need to insert a barcode onto a printed page. The page is built with HTML and uses tables etc. Can anyone suggest some PHP tools that can help me create a barcode and insert this into my page? Many thanks in advance. Stuart
  10. Hi I am hoping somone can help me? I am trying to generate a simple barcode to use on a website which will print out a label. I have found barcodephp.com and have installed this. When I use their test facility below it works fine and generates a barcode for A123. <?php require('class/BCGFont.php'); require('class/BCGColor.php'); require('class/BCGDrawing.php'); require('class/BCGcode39.barcode.php'); $font = new BCGFont('./class/font/Arial.ttf', 18); $color_black = new BCGColor(0, 0, 0); $color_white = new BCGColor(255, 255, 255); $code = new BCGcode39(); $code->setScale(2); $code->setThickness(30); $code->setForegroundColor($color_black); $code->setBackgroundColor($color_white); $code->setFont($font); $code->setChecksum(false); $code->parse('A123'); // Drawing Part $drawing = new BCGDrawing('', $color_white); $drawing->setBarcode($code); $drawing->draw(); header('Content-Type: image/png'); $drawing->finish(BCGDrawing::IMG_FORMAT_PNG); ?> As soon as I insert this same code into my code, or just try and put the barcode into a table (below) I get an error as shown. Can anyone point me in the right direction? echo "<table border = '1'>"; echo "<tr>"; echo "<td>"; require('class/BCGFont.php'); require('class/BCGColor.php'); require('class/BCGDrawing.php'); require('class/BCGcode39.barcode.php'); $font = new BCGFont('./class/font/Arial.ttf', 18); $color_black = new BCGColor(0, 0, 0); $color_white = new BCGColor(255, 255, 255); $code = new BCGcode39(); $code->setScale(2); $code->setThickness(30); $code->setForegroundColor($color_black); $code->setBackgroundColor($color_white); $code->setFont($font); $code->setChecksum(false); $code->parse('A123'); // Drawing Part $drawing = new BCGDrawing('', $color_white); $drawing->setBarcode($code); $drawing->draw(); header('Content-Type: image/png'); $drawing->finish(BCGDrawing::IMG_FORMAT_PNG); echo "</td>"; echo "</tr>"; echo "</table>"; <table border = '1'>‰PNG IHDRœSådù{LtEXtCopyrightGenerated with Barcode Generator for PHP http://www.barcodephp.comYp¸JIDATxœíA(t_ÀÏ{MchM’4iÒ42Yiú‡,,$I–”,$IÒ°øB’…b!ÉÊ‚YL’&YJRJš˜$é%M’Æ,¦§ù/Nßëeæ½oø†ïÍéüVæÜsï¼ó~Þ½÷]@2™„ß‚ DðguŽV$óÖl}—Ö_»Î¯¦ÉdÌï¸3"0ä`©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©a©Ôÿ_Œ¡?©a©a©a©É©}}}‚ ‚prr’a—‰‰ A...Ò¶>??OLLTWWçççÖÕÕ---½¿¿HÛÚÚjjj***ÊËË«©©™™™y{{û«J~€d.Çm6^ðÀÀ@&]B¡Éd€óóóÔÖÛÛ[§Ó‰VUUy<Q µµ5‘H(i˜ãr¹¼^¯ÅbÁü‡‡‡¬Õö ä†Ô ¼ã`³Ùb±˜~~0,((@i¥¶´´@IIÉññ1FÎÎÎÊÊÊàׯ_ÙÜÜ«Õº¿¿‘ûûûúúzèîîÎ^qÙ'7¤¢ÎµµµÚÚZX__×ÊŒÇã~¿;-©çççØ´¶¶¦Ž4}>ÌÍÍ©sÂá0˜L¦×××,—}r@j4ʼnôöövjj |>_ÚLI’***Àl6¯®®jI]YYÁ¦ûû{u<‹a\’¤d2999ÙÖÖvss£ÎI$˜syy™Õ*³IH]XX€ÚÚÚd2‰DðžF"‘ÔÌããcT‡“¿OÊR¥J’———?Ä_^^°Ë‘j ÿmaßFHõx<0;;‹qMÍ”$iggGù¨³¦¦%âš­Þ+©9<<¬¬¬¿ßÿÉ"~£K=;;ûðôÌÍÍáʧuë>+Õëõ@ooojSGGNì&“ÉàF“Æ—::: õõõJD’$Üý¾Ÿ’Š«µÕjÅõ¸¨# ÊžÙ˜Zª,Ëøš±¸¸¨Žã¾´µµU¿{æR€(Š¢(¦ýE‘eY’¤D"‡ÛÛÛqMÅeÛ˜Zj(Q£Ñ¨:¾¼¼Œñ´O•B†R÷ööÌf3ÌÏÏÿñ’dYnll€®®®LJø'ZjOO袤%©{{{xN499™áUá~Jy5 Æ•úúúŠ§B¥¥¥ŽðÔÐápèŒðG©»»»ht||<µ5¦];OOOñUøEýÆ•º¾¾‹åéé)µu{{…B!­ô¥*³îØØXjëÕÕÎð©Ç¼øÕN§ó3Õü(Æ•ÚÜܬ³tɲ\^^Z#èH=::Âi`ppP«»ÃáP¿+à™åÐÐPfuü*UyoÙÝÝÕÊñûý8 ~8íSÐ’úøøˆ›jŸÏ'˲Öø¸³X,Á`#±XÿnS\\|ww÷ù²~ƒJžžÆÕTç¦___£x­]«–ÔÁÁAlr¹\ÿ¥C9èèïïÇL§Óéõz­V+ØíöƒƒƒlUúTªÛ퀑‘ý4üšÛíNÛª%Õn·ëoªÕ]@KK‹Íf3›Í.—kxxØÈÏ(ò?ãö#)‰6¡IEND®B`‚</table> Many thanks Stuart
  11. I am trying to create a while loop to create multiple function scripts to validate some entries on my PHP page, however I cannot seem to get the loop to work correctly. Any help would be much appreciated. <script> var i = 0; var ii = 64; while (i < ii) { var validate = "validate" + i"; function validate + () { var teamName = document.getElementById("teamName").value; alert(teamName); } i++; } </script> Stuart
  12. I am trying to pass a PHP variable after the variable has loaded in PHP but nothing is coming through in the alert I have created to test. If anyone can help I would be grateful. $drawIdR2 = mysql_result($getEntriesRd2,$v,"tblteamevents.fkDrawId"); $teamNameR2 = mysql_result($getEntriesRd2,$v,"tblcompleteddraw.teamName"); echo "<tr>"; echo "<td align=\"left\" valign = 'top' width = '100' height = '20' style=\"font-family:arial; font-weight:normal; font-stretch:wider; font-size:14px; color:Black;\">"; if($i > $numberBys) { ?> <head> <script language="JavaScript"> <!-- function myFunction() { var alert1 = "<?php echo $teamNameR2; ?>"; alert("123"); } //--> </script> </head> <?php $drawIdR1 = mysql_result($getEntriesRd1,$xi,"tblteamevents.fkDrawId"); echo "<a href = 'javascript:myFunction()' style=\"A:link;color:Purple\">"; //echo "<a href = 'updateElimination.php?eventId=$eventId&ageGroup=$ageGroupId&round=1&drawId=$drawIdR1' style=\"A:link;color:Purple\">"; echo $teamNameR1 = mysql_result($getEntriesRd1,$xi,"tblcompleteddraw.teamName"); echo "</a>"; $xi++; Thanks for any help that anyone can help.
  13. Can anyone help why I am getting this error? SELECT SUM(NUMBERTEAMS1) FROM ( SELECT tblteamentry.confirm1 AS NUMBERTEAMS1 FROM middlesexwingsports.tblteamentry WHERE tblteamentry.fkAgeGroupId = '11' AND tblteamentry.confirm1 = '1' ) Thanks in advance for any help.
  14. I have a number of text boxes which are given their IDs dynamically as the page loads. This enables me to have 5 text boxes which I can then post to a database. An example of the name would be $name = "name" . $incrementNo; Name would would then be Name 1, 2, 3, 4, 5 etc...I am trying to validate these with some javascript code and I am trying to use var name1 = document.getElementById("<?php echo $name; ?>").value; however the PHP page will not pass back the $name? Any idea how I can get this working? Thanks in advance. Stuart
×
×
  • 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.