
Mr_J
Members-
Posts
188 -
Joined
-
Last visited
Never
Everything posted by Mr_J
-
Agree, I guess I will have to start from the first page and read through all the code
-
Webpage where you need to register and login before you can PURCHASE my product. 1st step: Register step2: Login Step3: Buy the Item. After registration, I use the meta refresh to goto Login.php Enter the user and password. My form gets processed and it stops at Login_Success.php where you must click on "CONTINUE". When I click continue, the correct page appear BUT it refresh itself every 5 seconds I will add the code, it's a bit messy but here is login_success.php <?php //hierdie kom in elke page wat net deur members gesien mag word session_start(); if(!$_SESSION['myusername']) {echo 'Please Login or Register';} ?> <html> <head> </head> <body> <h1> </h1> <center> <p>Login Successful</p> <p><a href="buynow.php"><input type="button" value="Continue"></a></p> </center> </body> </html> This the page to make the purchase. It is a form that will send mail with the order details... No money or transactions here buynow.php <?php //hierdie kom in elke page wat net deur members gesien mag word ##session_start(); ##if(!session_is_registered(myusername)){ ##header("location:main_login.php"); ##} session_start(); if(!$_SESSION['myusername']) {echo 'Please Login or Register';} require_once( dirname(__FILE__).'/buy/form.lib.php' ); phpfmg_display_form(); function phpfmg_form( $sErr = false ){ $style=" class='form_text' "; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" > <title>Pharmacy.za.org - Order Form</title> <link rel="stylesheet" type="text/css" href="style.css" > <style type="text/css"> .style2 { text-align: center; } <!-- MYNE --> /* body{ margin-left: 18px; margin-top: 18px; } body{ font-family : Verdana, Arial, Helvetica, sans-serif; font-size : 13px; color : #474747; background-color: transparent; } */ select, option{ font-size:13px; } ol.phpfmg_form{ list-style-type:none; padding:0px; margin:0px; } ol.phpfmg_form li{ margin-bottom:5px; clear:both; display:block; overflow:hidden; /*width: 100%*/ } .form_field, .form_required{ font-weight : bold; } .form_required{ color:red; margin-right:8px; } .col_field { margin:0 0 0 0; } .field_block_over{ } .form_submit_block{ padding-top: 3px; } .text_box, .text_area, .text_select { width:300px; } .text_area{ height:80px; } .form_error_title{ font-weight: bold; color: red; } .form_error{ background-color: #F4F6E5; border: 1px dashed #ff0000; padding: 10px; margin-bottom: 10px; } .form_error_highlight{ background-color: #F4F6E5; border-bottom: 1px dashed #ff0000; } div.instruction_error{ color: red; font-weight:bold; } hr.sectionbreak{ height:1px; color: #ccc; } </style> </head> <body> <div id="container"> <div id="header"> <div id="header_left"> <h1>Pharmacy<span class="red">.za.org</span></h1> <h2>CompuREP</h2> </div> <div id="header_right"> <p class="welcome"> <a href="logout.php">Logout</a> </p> </div> </div> <div id="left"> <h4><span class="menu_first_letter">Navigation</span></h4> <div id="navcontainer"> <ul id="navlist"> <li><a href="index.php">Home</a></li> <li><a href="buynow.php">Products</a></li> <li><a href="about_us.html">About us</a></li> <li><a href="sitemap.html">Site map</a></li> </ul> </div> <h4>Contact us </h4> </div> <div id="right"> <p class="style2"><img SRC="images/Image1.jpg" WIDTH="214" HEIGHT="93" /></p> <blockquote>Please complete the Order Form below.</blockquote> <p style="text-align:center;"> <img src="images/bp.png" width="159" height="140" alt="MedSET BPM" title="MedSET BPM"> <img src="images/oxy2.gif" height="140px" alt="MedSET Oxygen" title="MedSET Oxygen"> <img src="images/meter3.gif" class="style2" alt="MedSET GCU" title="MedSET BP-202H" width="159" height="140"> </p> <p> </p> <!-- My form begin --> <form name="frmFormMail" action='' method='post' enctype='multipart/form-data' onsubmit='return fmgHandler.onsubmit();'> <input type='hidden' name='formmail_submit' value='Y'> <div id='err_required' class="form_error" style='display:none;'> <label class='form_error_title'>Please check the required fields</label> </div> <ol class='phpfmg_form' style="width: 520px" > <li class='field_block' id='field_0_div' style="width: 520px"> <div class='col_label' style="width: 520px"> <label class='form_field'>Product</label> <label class='form_required' >*</label> </div> <div class='col_field'> <?php phpfmg_dropdown( 'field_0', "Please select|MedSET BP Monitor|MedSET Oxygen Concentrator|MedSET GCU 3-in-1", '' );?> <div id='field_0_tip' class='instruction'>Please select Product</div> </div> </li> <li class='field_block' id='field_1_div'><div class='col_label'> <label class='form_field'>Qty</label> <label class='form_required' >*</label> </div> <div class='col_field'> <input type="text" name="field_1" id="field_1" value="<?php phpfmg_hsc("field_1"); ?>" class='text_box'> <div id='field_1_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_2_div'><div class='col_label'> <label class='form_field'>Entity</label> <label class='form_required' >*</label> </div> <div class='col_field'> <?php phpfmg_dropdown( 'field_2', "Please select|Individual|Company", '' );?> <div id='field_2_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_3_div'><div class='col_label'> <label class='form_field'>Name</label> <label class='form_required' > </label> </div> <div class='col_field'> <input type="text" name="field_3" id="field_3" value="<?php phpfmg_hsc("field_3"); ?>" class='text_box'> <div id='field_3_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_4_div'><div class='col_label'> <label class='form_field'>Company Name</label> <label class='form_required' > </label> </div> <div class='col_field'> <input type="text" name="field_4" id="field_4" value="<?php phpfmg_hsc("field_4"); ?>" class='text_box'> <div id='field_4_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_5_div'><div class='col_label'> <label class='form_field'>VAT no</label> <label class='form_required' > </label> </div> <div class='col_field'> <input type="text" name="field_5" id="field_5" value="<?php phpfmg_hsc("field_5"); ?>" class='text_box'> <div id='field_5_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_6_div'><div class='col_label'> <label class='form_field'>Accept Terms</label> <label class='form_required' > *</label> </div> <div class='col_field'> <?php phpfmg_checkboxes( 'field_6', "Accept|Do NOT Accept" );?> <div id='field_6_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_7_div'><div class='col_label'> <label class='form_field'>Spesial Instructions</label> <label class='form_required' > </label> </div> <div class='col_field'> <textarea name="field_7" id="field_7" rows=4 cols=25 class='text_area'><?php phpfmg_hsc("field_7"); ?></textarea> <div id='field_7_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_8_div'><div class='col_label'> <label class='form_field'>Delivery Address</label> <label class='form_required' > *</label> </div> <div class='col_field'> <textarea name="field_8" id="field_8" rows=4 cols=25 class='text_area'><?php phpfmg_hsc("field_8"); ?></textarea> <div id='field_8_tip' class='instruction'></div> </div> </li> <li class='field_block' id='field_9_div'><div class='col_label'> <label class='form_field'>Contact Tel</label> <label class='form_required' > *</label> </div> <div class='col_field'> <input type="text" name="field_9" id="field_9" value="<?php phpfmg_hsc("field_9"); ?>" class='text_box'> <div id='field_9_tip' class='instruction'></div> </div> </li> <li class='field_block' id='phpfmg_captcha_div'> <div class='col_label'><label class='form_field'>Security Code:</label> <label class='form_required' > *</label> </div><div class='col_field'> <?php phpfmg_show_captcha(); ?> </div> </li> <li> <div class='col_label'> </div> <div class='form_submit_block col_field'> <input type='submit' value='Submit' class='form_button'> <span id='phpfmg_processing' style='display:none;'> <img id='phpfmg_processing_gif' src='<?php echo PHPFMG_ADMIN_URL . '?mod=image&func=processing' ;?>' border=0 alt='Processing...'> <label id='phpfmg_processing_dots'></label> </span> </div> </li> </ol> </form> <?php phpfmg_javascript($sErr); } ?> </div> <!-- Einde van MyForm --> <div id="footer"> <a href="http://www.pharmacy.za.org/pp.html">Privacy Policy</a> | <a href="disclaimer.html">Disclaimer</a> | © <?php echo date('Y');?> All Rights Reserved.</div> </body> </html> Why does BUYNOW refresh every 5 odd seconds. I have noticed that if I press Esc it stops loading/refresh
-
Thanks 4 the reply, I simply changed my script to header=page.php header("location:buynow.php");
-
REVRAS Thank you, It works!!
-
have you, just to see, set the file to 777?
-
BTW, this is the only php in BUYNOW.php exept for the form rows etc.: <?php //hierdie kom in elke page wat net deur members gesien mag word session_start(); if(!session_is_registered(myusername)){ header("location:main_login.php"); } require_once( dirname(__FILE__).'/buy/form.lib.php' ); phpfmg_display_form(); function phpfmg_form( $sErr = false ){ $style=" class='form_text' "; ?>
-
@Goldeneye I simply check the session and redirect to the login page. [myusername] is 100% valid session. Process.php: <?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name=""; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect to LOCALHOST"); mysql_select_db("$db_name")or die("cannot select DATABASE"); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=md5($_POST['mypassword']); $myemail=$_POST['myemail']; // To protect MySQL injection $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myemail = stripslashes($myemail); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $myemail = mysql_real_escape_string($myemail); $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword' and email='$myemail'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file... session_register("myusername"); session_register("mypassword"); session_register("myemail"); header("location:buynow.php"); } else { echo 'Wrong Username or Password<br/><a href="javascript:history.go(-1)"><input type="button" value="Back">'; } ?> @revrazI will try the { } to echo. You know these fucking host peoples do just what they want and for the price I pay per month, I will work my way around the problem... Thanks...
-
Dude, Give us some more info... It is very much possible to do it. Like if you need to display (and you can even update etc) the row of the table in the db. Your string will look something similar to: <table> <option select) <tr> <td><? echo ''$row1;?></td> </tr> </table> Of course this is very incomplete. You need to connect to the DB and select table and so on. Have you tried something yet? Do you know php? meaning how much knowledge have you got when writing in PHP I'm a noob myself but I like it... yeh, I like Peace out
-
Hi all, I have a site where the user must register to buy some products. After registration, you login and with the help of SESSIONS, you can view the page buynow.php. After the weekend, I opened the page and I got some yummy errors... Fatal error: Call to undefined function stop() in /home/pharmacz/public_html/ads/main_login.php on line 6 And line 6 reads: YES, BLANK... This is the php code: <?php session_start(); if(!session_is_registered(myusername)){ echo 'Please Login or Register'; } ?> I know I can use !isset... The register.php work fine Any Idea??
-
Can't see why... What does the div "panel4" do? Also, I used SharePointDesigner 2007 with a similar problem and with the controls in SPD, it gave the <tbody~ // <thead Style="width: 200px; ...> values and it was fine.
-
Just wondering, When I use: <meta http-equiv="refresh" content="3; URL=index.php"> What if some user is using dial-up ? will 3 seconds be enough?
-
Thank you. Will do. ::Peace I am still learning and only started a while ago with mysql...
-
Thanks, I got confused where I use 'mypassword' in the Login.php form...
-
I changed it but now there is NO value for $password in DB... wagwoord = md5($_POST['mypassword']); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=(md5($_POST['mypassword']) == $wagwoord); $myemail=$_POST['myemail'];
-
Hi all, 'Hope it is ok to post this here' I have a simple login form and registration that connects to table on database. everything worked and I decided to add md5 to my password to protect it a bit. When I 'Register' the md5 password $_POST to table in DB stay the same. i.e. [username]John [password]123 (md5: 5f77gj8vg2903nj38) and the same for [username]Jill [password]abc (md5: 5f77gj8vg2903nj38) Register.php - Form <form action="registrar.php" method="POST"> <p><label>Username:</label> <input type="text" name="username" style="width:200px;" ></p> <p><label>Password:</label> <input type="password" name="password" style="width:200px;" ></p> <p><label>Email:</label> <input type="text" name="email" style="width:200px;" ></p> <p><input type="submit" value="Register" class="sub_but"> <input class="sub_but" type="reset" value="Reset" ></p> </form> registrar.php - Processor <?php $host="localhost"; $username="username"; $password="password"; $db_name="database"; $tbl_name="members"; // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DATABASE"); $wagwoord = md5("password"); //this is what I added //Collect user information $username = $_POST['username']; $password = (md5($_POST['password']) == $wagwoord); //previous: $password = $_POST['password'] $email = $_POST['email']; //Write to table the user information mysql_query("INSERT INTO members (username, password, email) VALUES ('$username', '$wagwoord', '$email')") //previous $password ?> <html> <head></head> <body> <p>Thank you. Your Registration was Successfull. Please <span class="red">login</span> below.</p> <iframe src="login.php"></iframe> </body> </html> I have a problem to read/get value of the MD5 password as well. I basically used the same method. Any help appreciated
-
Hi I have a free guest-book and want to decrypt the code. I do not know what it was encrypted with. Is there a way I can decrypt it? Source: <script language="JavaScript" type="text"> var e=unescape("%9B%D4%D3%DE%CB%C2%87%D3%DE%D7%C2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A%FB%85%96%97%97%82%FB%85%87%CF%C2%CE%C0%CF%D3%9A%FB%85%85%87%8C%87%CF%C2%CE%C0%CF%D3%F8%D7%C2%D5%C4%C2%C9%D3%87%8C%87%85%FB%85%87%C1%D5%C6%CA%C2%C5%C8%D5%C3%C2%D5%9A%FB%85%97%FB%85%99%9B%88%CE%C1%D5%C6%CA%C2%99%85%8E%9C%9B%88%D4%C4%D5%CE%D7%D3%99%9B%D3%C6%C5%CB%C2%87%D0%CE%C3%D3%CF%9A%85%96%97%97%82%85%87%C5%C8%D5%C3%C2%D5%9A%85%97%85%87%C4%C2%CB%CB%D7%C6%C3%C3%CE%C9%C0%9A%85%97%85%87%C4%C2%CB%CB%D4%D7%C6%C4%CE%C9%C0%9A%85%97%85%99%9B%D3%D5%99%9B%D3%C3%87%CF%C2%CE%C0%CF%D3%9A%85%96%9F%85%87%C5%C6%C4%CC%C0%D5%C8%D2%C9%C3%9A%85%CF%D3%D3%D7%9D%88%88%D0%D0%D0%89%C6%8A%C1%D5%C2%C2%8A%C0%D2%C2%D4%D3%C5%C8%C8%CC%89%C4%C8%CA%88%CE%CA%C6%C0%C2%D4%88%C0%C5%F8%C5%C0%89%CD%D7%C0%85%87%C6%CB%CE%C0%C9%9A%85%C4%C2%C9%D3%C2%D5%85%87%C4%CB%C6%D4%D4%9A%85%D2%F8%EA%D5%ED%96%95%94%85%87%C5%C0%C4%C8%CB%C8%D5%9A%85%84%9E%9F%9E%C2%C6%91%85%99"); t=""; te=""; var p; p=e.length; for (i=0;i<p;i++){ t+=String.fromCharCode(e.charCodeAt(i)^167) }te=(t); document.write(te);</script> </head> <body> </body> </html>