Jump to content

Pavlos1316

Members
  • Posts

    302
  • Joined

  • Last visited

Everything posted by Pavlos1316

  1. Hello, I have this code to add items into the cart: <a href="javascript:ajaxpage('body.php?action=add&id=1', 'content');" class="adcart">Add to cart</a> This adds the item correctly but it takes me into the cart.php page. How should I modified it so it adds the item into the cart and keeps me into my parent page? Thank you
  2. Something else.... When clicking the Remove button $output[] = '<td><a href="javascript:ajaxpage(\'cart.php?action=delete&id='.$id.'\', \'content\');\" class="r">Remove</a></td>'; I need to Refresh my Header also. How is this done? Thank you.
  3. Ah... I accidentaly escaped all single quotes... I left '.$id.' untouched and is now working.
  4. Perfect... This is now working $output[] = '<td><a href="javascript:ajaxpage(\'cart.php?action=delete&id=\'.$id.\'\', \'content\');\" class="text">Remove</a></td>'; Thank you... I get no more the error BUT now my Remove button isn't working. Any ideas?
  5. Hello, ( Iam not very familiar with javascript) On my factions.php file I have this line of code that works fine: $output[] = '<td><a href="cart.php?action=delete&id='.$id.'" class="r">Remove</a></td>'; but I want to transform it to: $output[] = '<td><a href="javascript:ajaxpage('cart.php?action=delete&id='.$id.'', 'content');" class="bttn">Remove</a></td>'; but I get Unexpected T_String error. My Javascript code that makes <a href="javascript:ajaxpage....</a> to work in every other page is on top of my index.php Thank you
  6. ooooook... my break was inside the function and now I noticed. Thanks
  7. Hello, I have this syntax on my header div <p><a href="javascript:ajaxpage('shopcart.php', 'content');" class="difflink"><img src="../stock_photos/shopcart.png"><?php echo '<span class="text">'.writeShoppingCart().'</span>'; ?></a></p> but whatever I try it always output my echo in the next line instead of next to my picture file. How can I do it displayed at the same line? Thank you
  8. Here it is I have only changed "SELECT pass" to "SELECT *" <?php //Database Information $dbhost = "localhost"; $dbname = "masterdb"; $dbuser = ""; $dbpass = ""; //Connect to database mysql_connect ($dbhost, $dbuser, $dbpass)or die("Error: " .mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $email=$_POST['email']; if(!($email)){ include 'recover.php'; echo ""; exit(); } $result = mysql_query("SELECT email FROM db WHERE email='$email'"); if(!$result){ } else if($email!= mysql_result($result, 0)){ include 'recover.php'; echo ""; exit(); } $sql = mysql_query("SELECT * FROM db WHERE email='$email'"); $result = mysql_query($sql); // if found e-mail address, row must be 1 row // keep value $count = mysql_num_rows($result); if($count==1){ $rows = mysql_fetch_array($result); // keep password $pass = $rows['pass']; $name = $rows['name']; exit(); } session_start(); if($_SESSION['captchaCheck'] != $_POST['providedCaptcha'] && !empty($_SESSION['captchaCheck'])){ // TODO include 'recover.php'; echo ""; unset($_SESSION['captchaCheck']); exit(); } { include 'blank.php'; echo ""; echo '<META HTTP-EQUIV="Refresh" Content="5; URL=index.php">'; } $yoursite=''; $webmaster='Administrators'; $youremail=''; $subject="Υπενθύμιση Κωδικού Πελάτη"; $message="Αγαπητή/έ $name, E-Mail: $email Κωδικός Πελάτη: $pass Ευχαριστώ, $webmaster"; mail($email, $subject, $message, "From: $yoursite<$youremail>\nX-Mailer:PHP/" .phpversion()); ?>
  9. god... now it gave me the error log.... (or now I noticed it) $count=mysql_num_rows() it says that supplied argument is not a valid MySQL result resource What is wrong here? After I removed the mysql_query, I got NO error msgs (for sure) but no email at all as well! This is my email code.. $yoursite=''; $webmaster='Administrators'; $youremail=''; $subject="Υπενθύμιση Κωδικού Πελάτη"; $message=" E-Mail: $email Κωδικός Πελάτη: $pass Ευχαριστώ, $webmaster"; mail($email, $subject, $message, "From: $yoursite<$youremail>\nX-Mailer:PHP/" .phpversion());
  10. Hello, I have this code to retreive forgotten pass: //here is my db connection// $result = mysql_query("SELECT email FROM db WHERE email='$email'"); if(!$result){ } else if($email!= mysql_result($result, 0)){ include 'recover.php'; echo "bla bla"; exit(); } $sql= mysql_query("SELECT pass FROM db WHERE email='$email'"); $result=mysql_query($sql); // if found e-mail address, row must be 1 row // keep value $count=mysql_num_rows($result); if($count==1){ $rows=mysql_fetch_array($result); // keep password $pass=$rows['pass']; exit(); } //here I have the Send Email code including: $email $pass I get no errors, but inside the email I only get the $email and not the $pass. Any help? Thank you
  11. Nope... none is working.... How do I move this to javascript section???? (if is the right place to ask)
  12. really, I didn't know where to post... anyway I will just try both ways (even if I am sure I did it before) just in case.
  13. Hello Since I was using frames and no javascripts the <body onLoad=document.form.name.focus();> was working. Now, on this code, whatever I do inside body tag or not, javascript or not, I cannot make it focus! Can anyone tell me what is wrong/coflicting here and what code should I use to focus? (I post none focus script here) <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>NikoCreations</title> </head> <body> <p class="text"><form action="form.php" method="post" enctype="application/x-www-form-urlencoded" name="one" id="one"> Κωδικός Πελάτη <br /> <input name="cust_code" type="text" size="7" style="text-align: center"; maxlength="7" id="cust_code" <?php if (isset($_POST['cust_code'])) { echo 'value="'.$_POST['cust_code'].'"'; } ?> /> <br /> Κωδικοί Παραγγελίας <br /> <input name="order_code" type="text" size="7" style="text-align: center"; maxlength="5" id="order_code" <?php if (isset($_POST['order_code'])) { echo 'value="'.$_POST['order_code'].'"'; } ?> /> <br /> <br /> <img src="GenerateCaptcha.php?width=150&height=35&chs=5&font=Puzzle" /> <br /> <input name="providedCaptcha" type="text" size="19" style="text-align: center"; maxlength="5" id="providedCaptchaId" /> <a href="javascript:csslinks('tow.php', 'content');"><input name="Submit" type="submit" id="button" onclick="this.form.post" value="Submit" /></a> </form></p> </body> </html> Thank you
  14. sorry, you are right... let's see if we can find an answer here
  15. This is my page.php that opens inseide div id=contnent : <body onLoad="document.forms.order.cust_code.focus();"> <p class="text"><form action="order.php" method="post" enctype="application/x-www-form-urlencoded" name="order" id="order"> Κωδικός Πελάτη <br /> <input name="cust_code" type="text" size="7" maxlength="7" id="cust_code" <?php if (isset($_POST['cust_code'])) { echo 'value="'.$_POST['cust_code'].'"'; } ?>/> <br /> Κωδικοί Παραγγελίας<br /> <input name="order_code" type="text" size="5" maxlength="5" id="order_code" <?php if (isset($_POST['order_code'])) { echo 'value="'.$_POST['order_code'].'"'; } ?>/> <br /> <br /> <img src="GenerateCaptcha.php?width=150&height=35&chs=5&font=AmericanParticipants"/> <br /> <input name="providedCaptcha" type="text" size="19" maxlength="5" id="providedCaptchaId" /> <a href="javascript:ajaxpage('pelatis.php', 'content');"><input name="Submit" type="submit" id="button" onclick="this.form.post" value="Submit" /></a> </form></p> </body> </html> And this is how I check if sthing is wrong: if (!($order_code)){ include 'page.php'; echo "<font color=#00FFFF><font size=4><font weight=bold>Παρακαλώ εισάγετε τουλάχιστον μια (1) παραγγελία!</font></font></font>"; exit(); } But either using the include command or not opens the specified echo in a blank page instead of inside my page.php!
  16. where do I add that??? When I was using frames this was working: if (!($Full_Name)){ include 'register.php'; echo "<font color=#00FFFF><font size=4><font weight=bold>Please enter your Full Name!</font></font></font>"; exit(); } Now it doesn't. it opens the include 'file' in a blank page. How is it done using divs?
  17. Hello, First of all I am using only divs in my site. I am using js to open links inside my content div and is working fine. Now I have a form that customers need to fill. when they fill wrong things they get error msgs. How do I make the error msg to appear in my page instead of opening a new blank one? Thank you
  18. Hello (again ), Is there a way to set the header height at a % value and always be able to read the title in any monitor size? e.g. I set my header height to 10%. But when I open my web in a smaller monitor ( I use 22") the title is by half hidden. Thank you
  19. Thank you... I was starting to guess so... after of hours of testing. Thanks again.
  20. Hello, I now that if I write font-size: 10px; I will get 10px fonts in all monitor sizes. Now... if I write font-size: 75%; I will get fonts 75% of what??? Thank you.
  21. Stupid, stupid, stupid! Problem solved... I had to specify a margin... All the wide screen monitors that I was testing were using ie8 and ALL the normal monitors were using ie7! God I spend too much time on this. Thank you...!
  22. oh... sorry.... my mistake... I will come up with that...
×
×
  • 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.