PHP - Free Tour Access
I am trying to get around the login on one page on my server that my developer did but, now has decided to disappear. I know a little C++ but hardly no PHP.
Any one may view the thumbs but, when you click on the thumbnail you will be prompted to login. Which is fine what, I want, except for one page. I separated out the videos that I wanted to be free, created a new database table for them and wrote a function to lay out the thumbs to the screen but, you still get prompted to login. I thought there was a way to do it using $_SESSION or $_SERVER but, I just can't seem to get it to work. Any help would be appreciated. I've just spent to much time on this problem and I've got so any more to fix. Thanks grggfks Similar TutorialsI need free php chat module or script. Please tell me any known or good script. thanks Hey there, I'm looking for some publicly available API that I can convert GPB to Dollars, that is updated often, can somebody show me how I could obtain such a API?. Thanks, Christopher. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=319007.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=308040.0 Good morning, First, I want to thank this forum for all the help provided to me. I am new to Php programming, and honestly, I am still not good at reading codes. I am somehow able to understand how the code is written, but I am still learning, and I know myself, I still have lots to learn. I was able to finish now my very php project, again, thanks to this site and to other forum sites I have visited, and for my friends who helped as well. The web application I made is working fine now, but as I look into it, I know that once the database is populated with information, I will be required to put up pagination on my search page. And so, I looked online for pagination tutorials. I have found some, but I have to admit, it is still hard for me to comprehend the scripts I found. Just today, I found a script that I think would be a very good implementation to the web application I made. The problem is, I am not well familiar with adopting pre-made codes to the one I did, plus the fact that I can't well understand how the code is written. Can anyone help me implement the code, and somehow provide comments on the pre-made code I found in the web? Thank you in advanced for your responses. Here's my code: <link href="add_client.css" rel="stylesheet" type="text/css"> <?PHP include("dbconnection.php"); $query = "SELECT * FROM records"; $result = array(); if(isset($_POST["btnSearch"])) { $query .= " WHERE last_name LIKE '%".$_POST["search"]."%' OR first_name LIKE '%".$_POST["search"]."%'OR territory LIKE '%".$_POST["search"]."%'OR job_title LIKE '%".$_POST["search"]."%'OR title LIKE '%".$_POST["search"]."%'OR employer LIKE '%".$_POST["search"]."%' ORDER BY territory ASC" ; $result = mysql_query($query, $connection) or die(mysql_error()); } ?> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="760" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="199" align="center" valign="top"><a href="login.html"><img src="invent-asia.gif" alt="" width="152" height="58" border="0" /></a> <script type="text/javascript" src="menu.js"></script></td> <td width="176" align="right" valign="bottom"><a href="main.php"><img src="Home.jpg" width="104" height="20" border="0"/></a></td> <td width="130" align="right" valign="bottom"><img src="View.jpg" width="104" height="20" border="0"/></td> <td width="146" align="right" valign="bottom"><a href="add_client.php"><img src="Add.jpg" width="104" height="20" border="0"/></a></td> <td width="109" align="right" valign="bottom"> </td> </tr> </table></td> </tr> <tr> <td><table width="760" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="200" height="3" bgcolor="#1B1C78"><img src="images/topspacerblue.gif" alt="" width="1" height="3" /></td> <td width="560" bgcolor="#0076CC"><img src="images/topspacerlblue.gif" alt="" width="1" height="3" /></td> </tr> </table></td> </tr> <tr> <td height="553" align="center" valign="top" bgcolor="#F3FAFE"><br /> <form name="form" action="view_client.php" method="post"> <br /> <table width="351" border="0"> <tr> <td width="137" align="left" valign="middle">SEARCH RECORD:</td> <td width="144" align="center" valign="middle"><input type="text" name="search" /></td> <td width="56" align="left" valign="middle"><input type="submit" name="btnSearch" value="Search" /></td> </tr> </table> <br /> <table border="0" cellpadding="3" cellspacing="1" bordercolor="38619E" > <tr> <th width="80" align="center" bgcolor="#E0E8F3">Territory</th> <th width="330" align="center" bgcolor="#E0E8F3">Employer</th> <th width="160" align="center" bgcolor="#E0E8F3">Name</th> <th width="80" align="center" valign="middle" bgcolor="#E0E8F3"> </th> </tr> <?php if($result) { for($i=0; $i<mysql_num_rows($result); $i++) { $id = trim(mysql_result($result, $i, "id")); $territory = trim(mysql_result($result, $i, "territory")); $employer = trim(mysql_result($result, $i, "employer")); $first_name = trim(mysql_result($result, $i, "first_name")); $last_name = trim(mysql_result($result, $i, "last_name")); echo "<tr>"; echo "<td>".$territory."</td>"; echo "<td>".$employer."</td>"; echo "<td>".$last_name.", ".$first_name."</td>"; echo "<td><a href='edit_client.php?id=".$id."'>edit</a> | <a href='delete_client.php?id=".$id."'>delete</a> </td>"; echo "</tr>"; } } ?> </table> <p><br /> </p> </form> <p> </p></td> </tr> <tr> <td height="38"><table width="760" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="200" height="35" align="center" bgcolor="#1B1C78" class=white><img src="images/topspacerblue.gif" alt="" width="1" height="3" /> <a href="disclaimer.html"><font color="#FFFFFF">Legal Disclaimer</font></a> </td> <td width="560" align="center" bgcolor="#0076CC" class=white><img src="images/topspacerlblue.gif" alt="" width="1" height="3" /> Copyright © 2006 - 2010 InventAsia Limited. All rights reserved. </td> </tr> </table></td> </tr> </table> And here is the link of the pagination script I found: http://www.phpeasycode.com/pagination/ I'd rather have the pagination style of the first one. Note: I am not trying to be spoon fed here, but really in this case, I have tried what I think should work, but Sorry guys. (The way my code is written, you should see that I am a noob xD) This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=325818.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=317400.0 Are there any editors that will allow me to edit live on my server? I'm looking for a free open source solution Failing that: what recommended paid ones are there? I'm using Vista so need a Windows version Thanks OM Hello i am trying to make the admin login in a webpage and after I completed the page i uploaded it and now the page is not loading
Here is the script
<?php error_reporting(E_ALL); ini_set('display_errors', '1'); exit(); ?> <?php session_start(); if (!isset($_SESSION["manager"])){ header("location:admin_login.php"); exit(); } exit(); ?> <?php if(isset($_POST["username"])&&isset($_POST["password"])){ $manager=preg_replace('#[^A-Za-z0-9]#i','',$_POST["username"]); $password=preg_replace('#[^A-Za-z0-9]#i','',$_POST["password"]); include"../storescripts/connect_to_mysql.php"; $sql=mysql_querey("SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"); if($existCount == 1){ while($row = mysql_fetch_array($sql)){ $id = $rpw["id"]; } $_SESSION["id"] = $id; $_SESSION["manager"] = $manager; $_SESSION["password"] = $password; header("location:index.php"); exit(); } else { echo 'That Information is incorrect, try again <a href="index.php">Click Here</a>'; exit(); } } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Admin Login</title> <link rel="stylesheet" href="k../style/style.css" type="text/css" media=="screen" /> <script type="text/javascript" src="//use.typekit.net/jxp6vds.js"></script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script> </head> <body> <div align="centre" id="mainWrapper"> <?php include_once("../template_header.php") ?> <div id="pageConntent"> <h2>Please Log In To Manage The store</h2> <form id="form1" name="form1" meathod="post" action="admin_login.php"> Username:<br/> <input name="username" type="text" id="username" size="40"/> <br/><br/> Password<br/> <input name="password" type="password" id="password" size="40"/> <br/> <br/> <br/> <input type="submit" name="button" id="button" value="Log In" /> </form> </div> <?php include_once("../footer.php"); ?> </div> </body> </html>Thank you in advance I am using the free web host http://www.byethost2.com/ and need help figuring out where and how to make my php files to?! Currently I have the following Config file... Code: [Select] <?php // Build Date: 2011-12-17 1:15pm // Website Environment define('ENVIRONMENT', 'development'); //define('ENVIRONMENT', 'production'); // Web Root (aka Document Root) (**Physical Location) define('WEB_ROOT', ENVIRONMENT === 'development' ? '/Users/user1/Documents/DEV/++htdocs/05_Debbie/' : '/var/www/vhosts/MySite.com/httpdocs/'); // Base URL (**Virtual Location) define('BASE_URL', ENVIRONMENT === 'development' ? 'http://local.debbie/' : 'http://www.MySite.com/'); ?> What am I supposed to use for WEB_ROOT and BASE_URL on this free hosting site?! Currently, to view my test website you go to... http://www.doubledee.byethost2.com/ I suppose that could be "BASE_URL", but for where things are physically stored so I can redefine "WEB_ROOT" I have no clue... Help! Thanks, Debbie Hi guys, I am thinking of create an free email system by sending an messages using with a username. Would I have to store the messages via in mysql? If I can do that, then I just curious that how would a user delete their messages if their messages is display on php page? What method would I have to use? I sell a webscript which is written in the php language. What I want to do is create a license for each user and limit the script installation to one domain only. Also, I want to distribute this same script as a free trial for 15 days. After that the user must upgrade. The script will call home to verify if the user has valid record in our server or not. What's the best and "hard to crack" way to distribute license in that way? This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=321119.0
Hi, Many thanks Hello I am busy trying to setup a free to use budgeting and cashflow tool. I was recently going through my finances and whilst I found lots of spreadsheets on the subject, I didn't find a website that would allow me to store my data anonymously and access it when and where I felt fit. Bare in mind that I am a bit of a novice so go easy on me... So firstly, I've setup a page to collect 'account' information...that is, income items and expense items. I ask them to enter the amount, the frequency and when the next due date is. The DB looks like this: Code: [Select] CREATE TABLE IF NOT EXISTS `income_accounts` ( `inc_acc_ID` int(11) NOT NULL AUTO_INCREMENT, `user_ID` int(11) NOT NULL, `freq_ID` int(11) NOT NULL, `amount` decimal(7,2) NOT NULL, `next_due` date NOT NULL, `income_typeID` int(11) NOT NULL, PRIMARY KEY (`inc_acc_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=105 ; and the same for expense 'accounts': Code: [Select] CREATE TABLE IF NOT EXISTS `expense_accounts` ( `exp_acc_ID` int(11) NOT NULL AUTO_INCREMENT, `user_ID` int(11) NOT NULL, `freq_ID` int(11) NOT NULL, `amount` decimal(7,2) NOT NULL, `next_due` date NOT NULL, `ex_typeID` int(11) NOT NULL, PRIMARY KEY (`exp_acc_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; So once I have these entered by the user I should be able to then generate a cashflow forecast. For example, I give 5 options for the user: '4 weeks' , '8 weeks', '3 months', '6 months' '12 months'. Selecting one of these will then generate a table listing all of the items that apply for each period with a total at the bottom. Lets take '4 weeks' for an example. First I need to determine if the 'next_due' value is within the time period selected (4 weeks). If it is, what frequency is it? If it is every week then each column of the 4 column table created (i.e. 4 weeks/4 columns) will have it in it. If it is monthly frequency it will be only in the column for which it is due (i.e. column 1 would be todays date to todays date +6, column 2 = todays date + 7 to todays date +13 etc...) This will go through both the income table and the expense table and once all the items have been checked and added to the page table a further row would be added to total all the items in each column, and give a sum (i.e. sum of incomes less sum of expenses). For the '6 month' and '12 month' option, I want to display 1 month per column, rather than 1 week...just to not squeeze things up to much... I do not have a great deal of experience with arrays but my instinct tells me that they are the answer....otherwise I guess I could create a temporary DB table? I'm happy to share the code I've written so far if it helps...otherwise any advice on the best way to achieve this would be great. When I send values to the foreach they are not recorded in the array. $x = $getProductID; $_SESSION['pColors'] = array(); if(isset($_POST['pColors'])) { foreach($_POST['pColors'] as $colorKey => $RColors) { $_SESSION['pColors'][$colorKey] = $RColors; } } var_dump($_SESSION['pColors']); Send date with AJAX: $('.addToCart').click(function(){ $.ajax({ url:""+realLink+"cart.php", method:"POST", data:{action:action,pColors:pColors}, success:function(data){ //alert(data); } }); }); Array ( [game] => Array ( [id] => 2011012593950636050 [name] => Array ( [us] => Castlevania II: Belmont's Revenge [uk] => Castlevania II: Belmont's Revenge ) echo print_r($this->game[0]['name']) but undefined offset error. I don't want to loop through the first array either. Thanks I've got data in a mySql database which is updated daily. I would like to allow webmasters to place this data in a form of a widget on their websites provided they pay for access. If not payment comes through we should be able to block access.
Any suggestions how this project would be designed?
If a client connects to a ReactPHP TLS socket server, is it possible to obtain the symmetric key from within the PHP code? Hoping it will allow me to decrypt analysis traffic between two using Wireshark. Hello, folks. I am having a little trouble with this script. I want it to be able to read a directory, not just a file, and list all files in the directory along with their id3 tags. I can't get it to read all the files, it reads only the first file in the directory. Here, I'm posting the basic (stripped down) script, without mods or add-ons. I would appreciate any help. Thanks. Code: [Select] <?php require('error.inc.php'); require('id3.class.php'); $nome_arq = 'music.mp3'; $myId3 = new ID3($nome_arq); if ($myId3->getInfo()){ echo('<HTML>'); echo('<a href= "'.$nome_arq.'">Click to play: </a><br>'); echo('<table border=1> <tr> <td><strong>Artist</strong></td> <td><strong>Title</strong></font></div></td> <td><strong>Track</strong></font></div></td> <td><strong>Album/Year</strong></font></div></td> <td><strong>Genre</strong></font></div></td> <td><strong>Comments</strong></font></div></td> </tr> <tr> <td>'. $myId3->getArtist() . ' </td> <td>'. $myId3->getTitle() . ' </td> <td>'. $myId3->getTrack() . ' </td> <td>'. $myId3->getAlbum() . '/'.$myId3->getYear().' </td> <td>'. $myId3->getGender() . ' </td> <td>'. $myId3->tags['COMM']. ' </td> </tr> </table>'); echo('</HTML>'); }else{ echo($errors[$myId3->last_error_num]); } ?> |