PHP - Are There Any Free Live Editors For Php And Other Files?
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 Similar TutorialsI need free php chat module or script. Please tell me any known or good script. thanks 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 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 PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=308040.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=319007.0 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. Hello I have a simple question about file handling... Is it possible to list all files in directories / subdirectories, and then read ALL files in those dirs, and put the content of their file into an array? Like this: array: [SomePath/test.php] = "All In this php file is being read by a new smart function!"; [SomePath/Weird/hello.txt = "Hello world. This is me and im just trying to get some help!";and so on, until no further files exists in that rootdir. All my attempts went totally crazy and none of them works... therefore i need to ask you for help. Do you have any ideas how to do this? If so, how can I be able to do it? Thanks in Advance, pros So far I have managed to create an upload process which uploads a picture, updates the database on file location and then tries to upload the db a 2nd time to update the Thumbnails file location (i tried updating the thumbnails location in one go and for some reason this causes failure) But the main problem is that it doesn't upload some files Here is my upload.php <?php include 'dbconnect.php'; $statusMsg = ''; $Title = $conn -> real_escape_string($_POST['Title']) ; $BodyText = $conn -> real_escape_string($_POST['ThreadBody']) ; // File upload path $targetDir = "upload/"; $fileName = basename($_FILES["file"]["name"]); $targetFilePath = $targetDir . $fileName; $fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION); $Thumbnail = "upload/Thumbnails/'$fileName'"; if(isset($_POST["submit"]) && !empty($_FILES["file"]["name"])){ // Allow certain file formats $allowTypes = array('jpg','png','jpeg','gif','pdf', "webm", "mp4"); if(in_array($fileType, $allowTypes)){ // Upload file to server if(move_uploaded_file($_FILES["file"]["tmp_name"], $targetFilePath)){ // Insert image file name into database $insert = $conn->query("INSERT into Threads (Title, ThreadBody, filename) VALUES ('$Title', '$BodyText', '$fileName')"); if($insert){ $statusMsg = "The file ".$fileName. " has been uploaded successfully."; $targetFilePathArg = escapeshellarg($targetFilePath); $output=null; $retval=null; //exec("convert $targetFilePathArg -resize 300x200 ./upload/Thumbnails/'$fileName'", $output, $retval); exec("convert $targetFilePathArg -resize 200x200 $Thumbnail", $output, $retval); echo "REturned with status $retval and output:\n" ; if ($retval == null) { echo "Retval is null\n" ; echo "Thumbnail equals $Thumbnail\n" ; } }else{ $statusMsg = "File upload failed, please try again."; } }else{ $statusMsg = "Sorry, there was an error uploading your file."; } }else{ $statusMsg = 'Sorry, only JPG, JPEG, PNG, GIF, mp4, webm & PDF files are allowed to upload.'; } }else{ $statusMsg = 'Please select a file to upload.'; } //Update SQL db by setting the thumbnail column to equal $Thumbnail $update = $conn->query("update Threads set thumbnail = '$Thumbnail' where filename = '$fileName'"); if($update){ $statusMsg = "Updated the thumbnail to sql correctly."; echo $statusMsg ; } else { echo "\n Failed to update Thumbnail. Thumbnail equals $Thumbnail" ; } // Display status message echo $statusMsg; ?> And this does work on most files however it is not working on a 9.9mb png file which is named "test.png" I tested on another 3.3 mb gif file and that failed too? For some reason it returns the following Updated the thumbnail to sql correctly.Updated the thumbnail to sql correctly. Whereas on the files it works on it returns REturned with status 0 and output: Retval is null Thumbnail equals upload/Thumbnails/'rainbow-trh-stache.gif' Failed to update Thumbnail. Thumbnail equals upload/Thumbnails/'rainbow-trh-stache.gif'The file rainbow-trh-stache.gif has been uploaded successfully. Any idea on why this is? This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=325818.0 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 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=317400.0 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?
Hi, Many thanks This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=321119.0 Hello sir, I request an help for the live search.. Here are the 2 pages Code: [Select] <html> <form action='?p=search'> <font face='sans-serif' size='5'> <center> Search By the CID.<br> <input type='text' size='50' name='search'> <input type='submit' name'submit' value='Search'> </center> </font> </html> Code: [Select] <?php //get data $button = $_GET['submit']; $search = $_GET['search']; if (!$button) echo "You Have to insert a Valid CID."; else [ if (strlen($search)<=2) echo "Search term too short.The CID contain 6 number"; else [ echo"You searcher for <b>&search</b><hr size='1'>" } } ?> Now i want the live search by the name of the profile... Can someone help me? im am creating a live search using the w3schools tutorial. apart from im using mysql. here is my current code(which works fine): <?php mysql_connect("localhost", "root", ""); mysql_select_db("dictionary"); $words = mysql_query("SELECT * FROM words"); $a = array(); while ($row = mysql_fetch_assoc($words)) { $a[] = $row['word']; } $q = $_GET['q']; if (strlen($q) > 0) { $hint=""; for($i=0; $i<count($a); $i++) { if (strtolower($q)==strtolower(substr($a[$i],0,strlen($q)))) { if ($hint=="") { $hint=$a[$i]; } else { $hint = $hint . "</b><br /><br /> ".$a[$i]; } } } } // Set output to "no suggestion" if no hint were found // or to the correct values if ($hint == "") { $response="no suggestion"; } else { $response=$hint; } //output the response echo $response; ?> as you can see it is edited alot. But my problem is that i need to display underneath the word, the definition aswell. I've been trying to figure this out but i can't seem to do it. I have been trying to use multidimensional arrays. I bought script for live chat support but i want something more. Now you can login with admin role and operator role, but what i want is to add user role so when user login in app he can see online operators and chat with them. It is open source so there is no legal issue..
So if anyone wants to help me i will send script on your email and try to solve this..
Thanks,Ivan
Well I usually run my scripts in CLI.. I have it do something then sleep for x amounr of settings, is there anyway to make it show me the seconds counting down instead of just a blinkin cursor? |