39,326 Topics
| |
Here is my issue, I am really perplexed when it comes to string parsing and manipulation in php. I am writing a database driven inventory using mysql and php. One of the issues is that there are multiple people who are able (by company rule) to add to this database. … | |
Hello! We have an older site that was recenlty scanned and shown to be vulnerable to cross-site scripting and SQl injection. It was suggested that we modify our code to use prepared statements/PDO. They even offered this as a sample snippit of code: $user = 'xxxx'; $pass = 'xxxxx'; $dbh … | |
i have a script which will fetch content from a website, what i wanna do is modify all that links. Suppose: $html = str_get_html('<h2 class="r"><a class="l" href="http://www.example.com/2009/07/page.html" onmousedown="return curwt(this, 'http://www.example.com/2009/07/page.html')">SEO Result Boost <b> </b></a></h2>'); so, is it possible to modify or rewrite it in this way> <h2 class="r"><a class="l" href="http://www.site.com?http://www.example.com/2009/07/page.html">SEO … | |
I have a variable variable defined, suppose: $array[1] = Hello World; $i = 1; ${"name" . $i} = $array[1]; I then have the following: $val1 = "Hello World"; However when I try to compare $name1 to $val1, they are never equal. I've tried all of the following: if ($name1 == … | |
I am trying to use function reference, to return values from an array inside an function. I need to echo info to 8 different places on a page, and was trying to do this by using a refernce. But havent much exp. in that, so as of now, I am … | |
What I'm trying to acomplish is to have a list of years in a <form> with a checkbox for each year and let the user select what year applies to the post such as: 2008, 2009, 2012 (they might select 4 out of 5 years, not just one year). Then … | |
Hi all, I am new to Ext JS, I have tried 'drag and drop' and it is working fine when i drag rows. What I am trying now is dragging a row (a field from MySQL) from left grid and dropping it on right grid that gives data from database … | |
Hello, I'm sorry I bumped old and solved article, so I'm opening new. The problem is here: http://www.daniweb.com/web-development/php/threads/419063/updating-single-record-in-mysql-table-with-php-using-toggle-button This works fine, except that I have to click button two times the first time to change the status. later itr works fine. Anyone knows how to fix that? Thank You! | |
Im sorry to bother all of you but im a complete retard when it comes to scripting etc. More to the point: I downloaded a completed script but im getting error Notice: Undefined index: input_name in \index.php on line 17 and Notice: Undefined index: input_text in \index.php on line 18 … | |
Help me please I have a table with 9 columns After Column5, I want to have two rows in row1 = (Qualification) in row2, there are for columns(Ed, Tr, Ex, El) Thank You. <td rowspan="2"><b>Col5<b></td> <tr><td colspan="4"><b>Qualification</b></td></tr> <td><b>Ed</b></td> <td><b>Tr</b></td> <td><b>Ex</b></td> <td><b>El</b></td> | |
Hi i have a menu in an include php file: <div id="menu" > <?php // include functions include_once('includes/functions.php'); // array to hold top menu $top_menu_items = array( 'index.php' => array('text' => 'Home'), 'about.php' => array('text' => 'About'), 'contact.php' => array('text' => 'Contact') ); // call the function that draws the … | |
hi everyone i need your help in making course timetable algorithm in php? | |
I am having trouble with this code: This is the init.inc.php file <?php //init.inc.php file session_start(); $exceptions = array('signup', 'login', 'index'); $page = substr(end(explode( '/', $_SERVER['SCRIPT_NAME'])), 0, -4); // SQL stuff. mysql_connect('SQL host','username','password'); mysql_select_db('database name'); include('user.inc.php'); //$_SESSION['uid'] = 1; if (isset($_COOKIE['username'], $_COOKIE['password'])){ if (valid_credentials($_COOKIE['username'], $_COOKIE['password'])){ $_SESSION['username'] = htmlentities($_COOKIE['username']); setcookie('username', $_COOKIE['username'], … | |
Hi how can i tell the submenu to behave as the main menu this is the code for the main menu: if($script == $url) { // if the item in the array is the current page, highlight it $menu .= '<li><a style="color:#eb0089" href="#nogo"> '. $text . ' </a></li>'; } else … | |
Please advice, how to writing code in php , only echo letter that between [ ] , like we are going to [uk] echo uk | |
How we can start session <?php session_start(); $user_check=$_SESSION['login_user']; if(!isset($user_check)) { header("Location: login.php"); } ?> | |
Im a newbie in PHP and I want to create a simple webpage app for my website, I was able to produce this page base on a tutorial here. <?php $con = mysql_connect("localhost","*****","*****"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("*****", $con); $result = mysql_query("SELECT * FROM … | |
Hi, I have this code that selects the value of a combobox and it inserts into a input: <?php echo '<input id="matr_input" style="margin-left:15px;margin-top:10px;" name="id_cat"></input>'; $select_images="SELECT * FROM categories WHERE id_category='"./*combobox value*/."'"; $query_images=mysql_query($select_images) or die(mysql_error()); $image=mysql_fetch_assoc($query_images); ?> <?php $nome_arquivo = $image['img_category']; $arquivo = explode('images/', $nome_arquivo); if($image['img_category']!=''){ echo '<div style="margin-left:15px;">'.$arquivo[1].'<a href="delete_category.php?id='.$image['id_category'].'"><img width="10" … | |
Hello everybody, I have a login page which uses sessions to go to different pages and still allow the user to login when he returs to the initial logi.php page, but now I have implemented the different languages and I realize that whenever I hange the language (which is also … | |
Please help me..I've the following code and I entered an account number in bank account number field but in database was changing the value. what's wrong? My input in bank account number field is :112046067391 but the output is :2147483647 In database I set it to int(20) but still the … | |
My PHP script can fetch content from a div id, but what is the way to filter this fetch data and exclude some of its content which has this div id `<div id="navbar" class="n">content here content here</div>` I have tried with this code but its not working $regex = '#\<div … | |
I'm new to PHP and was given a code snippet that looks like this: { $DB = new DB('xxxxxx','oooooo','gggggg'); $return_result = false; $this->clear_data(); $m = new xmlrpcmsg( 'ldapxml.authorize' , array( new xmlrpcval($user_name, "string") , new xmlrpcval($password, "string") ) ); // this is just a temp server for now $c = … | |
Hello, I am having trouble with this custom admin panel. It is pretty simple, it has an admin login page, an index page , and a page where you can Add and Delete invetory items ( <--this one is the one with the problem ) Everything was working okey, I … | |
hey guys, im trying to change a menu items color, if a user was on the members section, the member menu icon would be a different colour to the other menu items etc. initially the menu item <li> has no css class assigned to it, but once they visit a … | |
Hi, i am trying to store some values into a database, but upon trying to add i am getting a "Column count doesn't match value count at row 1" i believe i am passing something incorrectly but was hoping someone could point me in the right direction i have included … | |
Hi, I wanted to create an online coding competion. Does anyone no how to go about it? I also want to apply time limits to the coding challenges. There are some existing tools but I need to create a some new features. Can anyone tell me how to start? Thanks | |
Hello, how to get all data in .php file Example i have webwebweb.com/work.php?worker=1&shop=52 How can i get **strings in worker to string [] worker strings in shop to string [] shop?** Thanks in advance | |
Hi, I have some basic php knowledge. I want to know about ' -> ' sign. What does this arrow means? I know it is very sipmle question but don't know. I am learning php from my own effort. Jahur | |
Hi, how many index i can create for one table in mysql. | |
Hi, Please help me work out this mod-rewrite issue while trying to make my urls SEF. RewriteEngine On Options +FollowSymLinks # Browse Category RewriteRule ^category/[!/.]*([A-Za-z]+)/?$ /browse.php?cat=$1 [NC,L] # View Item RewriteRule ^view/([0-9]+)/([a-zA-Z0-9-]+)$ /view.php?item_id=$1&sef=$2 [NC] This is my current .htacess. The browse category rule is working ok converting - http://localhost/browse.php?cat=people into … |
The End.