Jump to content

Johnain

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by Johnain

  1. Thanks a lot. I think I was looking for the comfort of a debugger from my experience of the horrific SAP ABAP/4 and slightly kinder vfp8. I have got use to stepping through code and watching variable values. I will mark this as solved now because I cannot work on this for two days and it's unfair to leave it open. But I will follow your link properly and use what it tells me. Thanks again, really helpful.
  2. This sounds reall good. Presumably this gives the MySQL message number? Would it give $reslut the value of that messag?
  3. Hi all I have been working for the first time this week with PHP. I love it. I now have a bi-lingual web site with e-mails etc. But now I have reached the point where Iwant to integrat a database using My SQL. I know SQL rasonably well, but I am not getting the results that I expect. So this is the point where I need a debugger. I downloaded and installed Gubed Release 0.2.0 onto my PC.It runs. But now is the point where I am overwhelmd by Techochat. Obviously I want to follow the steam on my hosting server. wheb I look into the Gubed help uder "installation" it says ... "Copy the server scripts directory of the Gubed Archive to your webroot." What scripts? What Archive?
  4. Thank you very much. It's a steep learning curve for me, but I am enjoying it. Regards John
  5. Sorry about the dodgy faces. I thought I was just putting question marks in.
  6. can I do this? I want to pass a language value (EN/FR/DE etc.) from an Index HTML page to a PHP page with a language code in the call, so that the PHP page can select texts in that language. I would like to to it from an unordered list item if possible by extending the link ... <li><a href="scripts/pricelist.php??????????????????>Pricelist</a></li>
  7. Please regard yourself as a superstar. I will try it now. Looks like I have got plenty of learning to do. But no surprises there. I am looking forward to it. Regards and thanks That works. Thanks very much. Mrs Johnain no longer frightened to come in the room Regards and thanks John
  8. Please regard yourself as a superstar. I will try it now. Looks like I have got plenty of learning to do. But no surprises there. I am looking forward to it. Regards and thanks
  9. Thanks for that Adam. I appreciate your help. This, however is the equivalent of having two php files with two sets of logic to maintain, and I am trying to avoid that if I can. Regards john
  10. Hi Rajiv. Thanks for your interest. I have not put all of the multi-ling code in, just some bits, but here it is ----------------------------------------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Le Pré De Barre :Contact us</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../css/style1.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <div id="sitebranding"> <?php $langg = $_POST['langg']; ?> <h1>Le Pré De Barre </h1> </div> <div id="tagline"> <?php if ($_POST['langg']="EN"){ echo "<p>Training and supporting the horse and rider </p>"; } elseif ($_POST['langg']="FR"){ echo"<p>Formant et soutenant le cheval et le cavalier </p>" ; } else { echo "<p>Training and supporting the horse and riderrrrrrr </p>" ; } ?> </div><!-- end of tagline div --> </div> <!-- end of header div --> <div id="navigation"> <ul> <li><a href="../index.html">Home</a></li> </ul> </div> <!-- end of navigation div --> <div id="bodycontent"> <table> <tr><td><?php echo $_POST['langg']; ?></td></tr> <tr><td><?php echo $langg; ?></td></tr> </table> <?php $ip = $_POST['ip']; $httpref = $_POST['httpref']; $httpagent = $_POST['httpagent']; $visitor = $_POST['visitor']; $visitormail = $_POST['visitormail']; $notes = $_POST['notes']; $attn = $_POST['attn']; $country = $_POST['country']; $agerange = $_POST['agerange']; $telephone = $_POST['telephone']; $gender = $_POST['gender']; $errorreported = 0; $errortext = ""; if (eregi('http:', $notes)) { $errorreported = 1; $errortext = "1"; echo "<p>Please do not insert web addresses in your mail</p>"; } if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { $errorreported = 2; $errortext = $errortext.' 2'; echo "<p>You have not entered a valid e-mail address.</p>"; } if(empty($visitor) || empty($visitormail) || empty($notes )) { $errorreported = 3; $errortext = $errortext.' 3'; echo "<p>We need your e-mail address, name and message content before we can send an e-mail.</p>"; } if($errorreported > 0 and $langg = "EN") { echo "<p>Sorry, your e-mail has not been sent yet because it contains an error or is incomplete.</p>"; ?> <p><a href="contact.php">Click here to return to your e-mail</a></p> <?php die (); } if($errorreported > 0 and $langg = "FR") { echo "<p>Désolé, votre E-mail n'a pas été envoyé encore parce qu'il contient une erreur ou est inachevé.</p>"; ?> <p><a href="contactfr.php">Clic ici à retourner à votre E-mail</a></p> <?php die (); } $todayis = date("l, F j, Y, g:i a") ; $attn = $attn ; $subject = $attn; $notes = stripcslashes($notes); $message = " $todayis [EST] \n Attention: $attn \n Message: $notes \n Age Range: $agerange\n Telephone: $telephone\n Gender: $gender\n Country: $country\n From: $visitor ($visitormail)\n Additional Info : IP = $ip \n Browser Info: $httpagent \n Referral : $httpref \n "; $from = "From: $visitormail\r\n"; mail("johnreg@ourlpdb.com", $subject, $message, $from) ?> <p align="center"> Date: <?php echo $todayis ?> <br /> Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> ) <br /> Attention: <?php echo $attn ?> <br /> Message:<br /> <?php $notesout = str_replace("\r", "<br/>", $notes); echo $notesout; ?> <br /> <?php echo $ip ?> <br /><br /> <a href="../index.html"> Continue </a> </p> </div><!-- end of bodycontent div --> <div id="rightcol"> <table> <tr> <td style="width:150 align:right"><img src="../images/yippee.jpg" width="135" height="157" border="0" alt="Yippee !"></td> </tr> <tr> <td><img src="../images/3lpdb.gif" width="135" height="332" border="0" alt=""></td> </tr> </table> </div> <!-- End of rightcol div --> </body> </html> ----------------------------------------------------------------------- Regards and thanks John
  11. Hi Thanks for the reply I want the user visible stuff in my form to be in french or english.
  12. Hi people I am an experienced VFP and ABAP developer with a pretty good grasp of HTML, and recently XHTML. I have always been alittle wary of web based languages (fear of the unknown !) but now I have started with PHP I really like it. My problem is (I think) with the scope of variables. I have two php pages for the user to send an e-mail, one in French and the other in English. They both build the same form with the same variables, but their HTML text is in different languages. The form's action in each both call the same "validate and send" php page. Within each "sending" form I create a variable called $langg and set it to EN or FR so I can send out different language texts and <a> jumps afterwards depending on the language. In the French sending form I say ... $langgi = "FR"; <input type="hidden" name="langg" value="<?php echo $langgi ?>" /> I do not understand how debuggers work so in my target "validate and send" form I first interpret the lanng variable ... $langg = $_POST['langg']; ... and then put in an echo to see what I get ... <table> <tr><td><?php echo $_POST['langg']; ?></td></tr> <tr><td><?php echo $langg; ?></td></tr> </table> Row 1 gives EN and Row 2 gives FR Is this a scope issue? Can anybody see what I am doing wrong?
×
×
  • 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.