Jump to content

Ch3vr0n

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

About Ch3vr0n

  • Birthday 02/10/1983

Contact Methods

  • MSN
    wimvandekerckhove@hotmail.com
  • Website URL
    http://

Profile Information

  • Gender
    Not Telling
  • Location
    Behind my computer, somewhere in the universe

Ch3vr0n's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. can't possibly be that simple ? What if i have multiple submit buttons on the same page (each with their own name ofc)
  2. I've been using php for a while now to create forms, up until now i've always transmitted the form data to a new php document that then processes them. I wanna take this to the next level and start trying to process the data within the same document. I know this has something to do with checking if the submit button is pressed and then processing the submitted data but thats about as far as my knowledge goes. Can anyone help me out on how i can achieve this type of thing. The reason is that i've found a way to execute php code within a joomla 1.6 environment without having to use the iframe option. I know the iframe option may be easier in a way of doing things but its out of the question. The final fase of the php will output code that will trigger a specific joomla plugin to do some specific action. If i pull a php document via an iframe the plugin doesnt trigger as it only gets triggered after the joomla "afterRender" (or something" has executed. If i use the iframe option then that rendering never gets used so the plugin doesnt get triggered. So in a nutshell, i wanna create forms that submit data and that data gets processed in the same document (in this case joomla article). How do i go about doing this.
  3. bumpie. Anyone. The code has chenged in the mean time. <?php session_start(); $naam=$_POST['naam']; $voornaam=$_POST['voornaam']; $email=$_POST['email']; $klantnummer=$_POST['klantnummer']; $afdeling=$_POST['afdeling']; $onderwerp=$_POST['onderwerp']; $bericht=$_POST['bericht']; $secure = trim(strip_tags($_POST['secure']));// leave case as entered $match = $_SESSION['captcha']; // the code on the image if (($secure!=$match) && ($secure!="")) { echo "<link rel='stylesheet' href='../../../../templates/techline_de_template-j15-001/style2.css' />Security code ongeldig.<br/>Ga <a href=\"javascript:history.go(-1)\">Terug</a> en probeer opnieuw. "; } if ($secure=="") { echo "<link rel='stylesheet' href='../../../../templates/techline_de_template-j15-001/style2.css' />Security code niet ingevuld.<br/> Ga <a href=\"javascript:history.go(-1)\">Terug</a> en probeer opnieuw."; } elseif(($secure==$match) && ($secure!="")) { if (($naam=="") || ($voornaam=="") || ($email=="") || ($klantnummer=="") || ($afdeling=='kies') || ($onderwerp=="") || ($bericht=="")) { echo "<link rel='stylesheet' href='../../../../templates/techline_de_template-j15-001/style2.css' />1 of meerdere velden niet ingevuld.<br/>Ga <a href=\"index.php\">Terug</a> en probeer opnieuw."; } elseif (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { echo "<link rel='stylesheet' href='../../../../templates/techline_de_template-j15-001/style2.css' />Ongeldig e-mail adres ingevuld.<br/>Ga <a href=\"index.php\">Terug</a> en probeer opnieuw."; } /* klantnummer field formatcheck goes here. Based on klantnummer, extra info will be retrieved from database */ else { ?> <html> <head> <link rel="stylesheet" href="../../../../templates/techline_de_template-j15-001/style2.css" /> </head> <body> <form action="send.php" method="post"> <table> <tr> <th colspan="2">Gelieve onderstaande gegevens te controleren.</th> </tr> <tr> <td>Naam: <?php echo $naam ?><input type="hidden" name="naam" value="<? echo $naam ?>" /></td> <td>Voornaam: <? echo $voornaam ?><input type="hidden" name="voornaam" value="<? echo $voornaam; ?>"/></td> </tr> <tr> <td colspan="2">E-Mail: <?php echo $email ?><input type="hidden" name="email" value="<? echo $email ?>"/></td> </tr> <tr> <td>Klantnummer: <? echo $klantnummer ?><input type="hidden" name="klantnummer" value="<? echo $klantnummer ?>"/></td> <td>Bestemd voor: <? echo $afdeling ?><input type="hidden" name="afdeling" value="<? echo $afdeling ?>" /></td> </tr> <tr> <td align="center" colspan="2">Onderwerp: <? echo $onderwerp ?><input type="hidden" name="onderwerp" value="<? echo $onderwerp ?>"/></td> </tr> <tr> <td align="center" colspan="2">Uw bericht<br /><? echo $bericht ?><br /><input type="hidden" name="bericht" value="<? echo $bericht ?>" /></td> </tr> <tr> <td colspan="2" align="center">Is dit correct ? Zoja druk op versturen. Indien niet druk op herbeginnen.</td> </tr> <tr> <td colspan="2" align="center"><input type="submit" value="Versturen" /><input type="reset" value="Herbeginnen" onClick="window.location.href=index.php"></td> </tr> </table> </form> </body> </html> <? } } ?>
  4. I'm in the process of creating a form but I'm running into a problem. I'm not that experienced with php/sql so I'll define what i need here. There is a field called "klantnummer" that needs to be in a fixed format. The format will be as followed "xxxx-yyy". Where xxxx will be the year (eg 2008, 2009, ....), - will be the mandatory divider, and yyy will be another number but not fixed in length. A valid number would be like 2008-001 or 2009-1 or 2009-03. The fixed part is "xxxx-", that will always stay like that. To see if a "klantnummer" is valid, it needs to verify if the "klantnummer" exists in the database "klanten". I know there is a function or somethin called mysql_fetch_object but i don't really know how to use it or if there is a simpler way. The page that has the form coded is separate. eg page : index.php has the form created in HTML > form action = stap2.php what i have so far is this. <?php session_start(); $naam=$_POST['naam']; $voornaam=$_POST['voornaam']; $klantnummer=$_POST['klantnummer']; $afdeling=$_POST['afdeling']; $bericht=$_POST['bericht']; $onderwerp=$_POST['onderwerp']; $secure = trim(strip_tags($_POST['secure']));// leave case as entered $match = $_SESSION['captcha']; // the code on the image if (($secure!=$match) && ($secure!="")) { echo " Security code ongeldig.<br/> Ga <a href=\"javascript:history.go(-1)\">Terug</a> en probeer opnieuw. "; } if ($secure=="") echo "Security code niet ingevuld.<br/> Ga <a href=\"javascript:history.go(-1)\">Terug</a> en probeer opnieuw. "; elseif(($secure==$match) && ($secure!="")) { if (($naam=="") || ($voornaam=="") || ($klantnummer=="") || ($afdeling=="") || ($onderwerp=="") || ($bericht=="")) { echo "1 of meerdere velden niet ingevuld.<br/> Ga <a href=\"javascript:history.go(-1)\">Terug</a> en controleer de velden."; } else echo $naam."<br/>".$voornaam."<br/>".$klantnummer."<br/>".$afdeling."<br/>".$onderwerp."<br/>".$bericht; // temporary code to see if data is transmitted } ?> Can you guys help me ?
  5. any chance on rotating bg's either ? but thats just as an extra update. Lowercase : worked like a charm mate. Thx for the script. Maybe ill give ya some credit on my website once the changes go live ;)
  6. sry will. I've already implemented this one. Thx for the offer but im not gonna start all over from scratch again. AndyB is there a possibilty on the stuff i asked?
  7. update, i found the bug (with help of my provider). In the captcha_image.php the config file gets called from the dir captchas/captcha_config.php , but while unzipping it gets extracted into the main dir. So it was just a way of moving the file or removing the captcha/ part in the config file on line 3. 2 last questions. 1) As extra security i would like to ad the small letters too. Currently it only uses CAPS & numbers, but when i add the lowerercase letters too i get securitycode mismatch. Can i do this or should i leave it ? 2) Is it possible to have a rotating background (this is optional) ?
  8. instructions were clear, didnt modify anything yet. That's exactly the problem. GD is version 2.0.28 as in the quote so it should work. Can it be it has problems with dynamic generated images ? Ifso, can it be set to use static jpg's ?
  9. [quote] gd GD Support  enabled  GD Version  bundled (2.0.28 compatible)  FreeType Support  enabled  FreeType Linkage  with freetype  GIF Read Support  enabled  GIF Create Support  enabled  JPG Support  enabled  PNG Support  enabled  <== WBMP Support  enabled  XBM Support  enabled  [/quote] yet the image is not generated. Next step ? The full info can be viewed here http://www.fastrax.be/chevron/imggen/test.php
  10. k i upped your captcha script, but in the place of the image i'm getting a red cross (as with the other scripts), this means that the GD2 is not installed ? Can i load externally to your script, or can it be modified to a solid bg or something ? If it cannot and i have to ask my provider to install the GD librairy, where does he need to put it and what needs to be done, or is there an alternative. I'd rather have generated ones, then an array since the prior is more secure.
  11. Hy there folks, on my website i have a couple forums that have been massively abused by robots and spiders lately. For the past couple days i have been looking for a php script (thats easy to embed in current form) but to no luck. The ones i did fid required the GD librairy ?? , or failed to show the image (even with the correct font uploaded). Now my question is, can anybody script such a thing (pref without the GD librairy whatever it is), or know one ? Because without such a thing i cannot bring the forms back online (and they already have a scriptpart that checks for empty fields that are obligated). Catch my drift, i really need this.
×
×
  • 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.