Jump to content

tmbrown

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Everything posted by tmbrown

  1. Okay, so I have a class that writes out FDF's and PDF's. Now with the PDF child class I can add an image no problem. The FDF class is the problem. I do not know enough about FDF's to know whether this is possible or not. Therefore my question is: Is it possible to add images to a PDF using an FDF?
  2. yeah you can actually, i use it at work: http://dev.tserver.net/pdfgen. As far as the ')', my mistake. It would be <form id="YourForm" action="javascript:makePostString('YourForm','YourProcessorPage.php');" method="post">
  3. you're right he doesn't, but this eliminates the need to refresh or go to a different page, it also eliminates the need for error scripts.
  4. you'll need to use javascript /* * Send post data to the processor page to generate the FDF file. */ var obj = new XMLHttpRequest(); function makePostString(form,address){ var elem = document.forms[form].elements; for (i = 0; i < elem.length; i++) { if (i == 0) { str = elem[i].name + '=' + elem[i].value; } else { str = str + '&' + elem[i].name + '=' + elem[i].value; } } getName(str,address); } function getName(postvals,address){ obj.open("POST",address,true); obj.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); obj.setRequestHeader("Content-length", postvals.length); obj.setRequestHeader("Connection", "close"); obj.onreadystatechange = function(){ if (obj.readyState == 4 && obj.status == 200) { document.getElementById('pdf-frame').src = obj.responseText; } } } obj.send(postvals); All you have to do to use this is <form id="YourForm" action="makePostString('YourForm','YourProcessorPage.php" method="post"> This will submit the form without ever reloading the page. All you do to get the vars submitted on the processor page is the standard $_POST['YourField']. Cheers!
  5. onclick="value='';" Example: <input type="text" name="MyTextBox" value="Some Value" onclick="value='';" /> From there on it becomes more complex.
  6. <?php $result = mysql_query("SELECT * FROM {table} WHERE {field} ='{valuer}'"); $count = mysql_num_rows($result); echo($count); ?> or you could do this <?php $result = mysql_query("SELECT * FROM {table} WHERE {field} ='{valuer}'"); $arr = array(); while($row = mysql_fetch_assoc($result)){ $arr[] = $row; } if(is_array($arr)){ $count = count($arr); echo($count); } ?>
  7. encode it example <?php function Encode($str){ $cypher1 = md5(15686895356); $cypher2 = sha1(15683215661); $str = bin2hex($str); return $cypher2.$str.$cypher1; } ?> <input type="hidden" name="business" value="<?php echo(Encode($adminpaypal)); ?>" /> Once the form is submitted <?php function Decode($hash){ $cypher1 = md5(15686895356); $str = substr($hash,0,strpos($hash,$cypher1)); $hash = pack("H*",$str); return $hash; } $_POST['business'] = Decode($_POST['business']); Or something similar
  8. Yeah, pain in the you know what, I managed to find a free ssl signing servive from comodo http://www.instantssl.com I gave up trying to get it to work my way. The cert only lasts like 90 days, but it's free to renew so what the hell, it beats the heck out of paying like $100 a year.
  9. Looks like some kind of file validation, however it is calling a serverside file from rapidshare, not an actual file link. As far as the database goes I do not see anything in there that is pointing to another DB server other than localhost. What exactly is the script "supposed" to be doing?
  10. can someone direct me to a link or somewhere that will show me how to make and sign my own ssl certs without IE or mozilla yelling at me? here's an example: https://www.theforumlife.com/ It doesnt like it because it is self signed :-\
  11. Thanks, for the input. I will move on to more database architectures once i get the structure of the forum soild, I have some friends who keep telling me things they'd like to see so I'm trying to work it all in. Time is so rare these days. Though the idea behind this is simplicity. Though it is somewhat complex it is nothing compared to, say, SMF or vBulletin. I just thought it'd be cool to wirte a somewhat generic forum, but it turned into something cool and hopefully whenever, if ever, I finish it, it will be grand. But thanks again for the input and I will try to have this fixed in the next build. if you would like to view the builds just go here http://dev.tserver.net/apps/forum/
  12. no prooblemo
  13. okay you can do this many ways I will show you the easiest. <?php //discover whether the form has been submitted or not if(isset($_POST['action'])){ //We now want to process the login info require_once("login.inc.php"); } //Display the form else{ echo("<form action=\"".$_SERVER['PHP_SELF']."\" method=\"post\">"); echo("<input type=\"hidden\" name=\"action\" value=\"login\" />"); //Any other inputs you may neeed echo("</form>"); } ?> What this does is makes sure the action is set BEFORE it processes anything, therefore when we get to the processor we only have the validate the info, not check for it.
  14. how are you getting to this page? Are you submitting a form with a input field with the action as a value or are you submitting the form to the url: yourpage.php?action=login ?
  15. well you else if statement is looking for a $_GET['action'] var, you should keep it uniform, make it either $_GET or $_POST. As you know $_GET is pulling from the url, therefore if it is looking for a $_POST var you should be submitting a form to get there. Some code to try: <?php if(isset($_GET['action']) && $_GFET['action'] == "login"){ //Execute Code } else if(isset($_GET['action']) && $_GFET['action'] == "logout"){ //Execute Code } ?> You could even go so far as cases: <?php if(isset($_GET['action'])){ switch($_GET['action]){ case "login" : /* Execute Code */ ; break ; case "logout" : /* Execute Code */ ; break ; default : header("location: index.php") ; break ; } } ?>
  16. is $name an actual variable or do you just wish to display "name"?
  17. looks like a typo here if($_POST['action'] == "login") Should it be if($_GET['action'] == "login") ?
  18. change echo "<input type="text" name="name$i"> to echo "<input type=\"text\" name=\"name".$i."\">";
  19. tmbrown

    tables

    well i meand you can put the style tag right inside the table tags. <table style="border: thin solid;border-color: #000;"></table> Other than that, not, but the CSS method does give you more control over how the border looks.
  20. tmbrown

    tables

    use the css method. <style type="text/css"> .tblborder{ border: thin solid; border-color: #000; } </style> <table class="tblborder"></table>
  21. tmbrown

    tables

    are you trying to do this personally or trying to get your code to show in the forum? show code on the forum: [ code ] Code Here [ /code ] Remove the spaces
  22. tmbrown

    tables

    <table border="1"></table> or take the css approach <style type="text/css"> .tblborder{ border: thin solid; border-color: #000; } </style> <table class="tblborder"></table>
  23. what version of linux are you running?
  24. Try this <?php if ($dbmain) { $query="SELECT pilotname FROM Pilot_Data WHERE pilotname = '".$pilotname."'"; $result = mysql_query($query); $count = mysql_num_rows($result); if ($count == 1) { $updaterecord = true; } else { $updaterecord = false; } if ($updaterecord == true) { $query = "UPDATE Pilot_Data SET pilotdate = '".$pilotdate."', pilottime = '".$pilottime."', pilotcorp = '".$pilotcorp."', pilotcorpid = '".$pilotcorpid."', pilotalli = '".$pilotalli."', pilotalliid = '".$pilotalliid."', pilotcorprole = '".$pilotcorprole."', pilotregion = '".$pilotregion."', pilotconst = '".$pilotconst."', pilotsystem = '".$pilotsystem."', pilotnear = '".$pilotnear."', pilotstation = '".$pilotstation."' WHERE pilotname = '".$pilotname."'"; } else { $query = "INSERT INTO Pilot_Data (pilotname, pilotdate, pilottime, pilotnameid, pilotcorp, pilotcorpid, pilotalli, pilotalliid, pilotcorprole, pilotregion, pilotconst, pilotsystem, pilotnear, pilotstation ) Values ('".$pilotname."', '".$pilotdate."', '".$pilottime."', '".$pilotnameid."', '".$pilotcorp."', '".$pilotcorpid."', '".$pilotalli."', '".$pilotalliid."', '".$pilotcorprole."', '".$pilotregion."', '".$pilotconst."', '".$pilotsystem."', '".$pilotnear."', '".$pilotstation."')"; } mysql_query($query); mysql_close($dbmain); } ?> you seem to be missing a few steps to determine if the pilot name in the db is the same as the pilot name stored in the variable. instead parse on the basis of a count, if the count is 1 then the user exists, therefore run the update, if not the run the insert.
  25. do a switch <?php switch($affil){ case 1 : /* Execute Code */ ; break ; case 2 : /* Execute Code */ ; break ; case 3 : /* Execute Code */ ; break ; case 4 : /* Execute Code */ ; break ; case 5 : /* Execute Code */ ; break ; } ?> where the number beside case is the value of $affil
×
×
  • 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.