No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
19 Posted Topics
Re: str.erase (std::remove (str.begin(), str.end(), ' '), str.end()); | |
Hi, I trying to create some dirs like this: [CODE]@mkdir("photos/$cat/$sku", 0777, true)[/CODE] it creates the first directory with 0777 permissions, but when it creates the second is uses 000 as it's perms, so it fails to create the third. A workaround this please? Thanks, Richard. | |
Re: also i would suggest to use something like this: [CODE]<?php //connect to db $conn = mysql_connect("localhost", "blahn", "blah") or die(mysql_error()); mysql_select_db("gdh") or die(mysql_error()); //declares variable $username=$_POST["username"]; $password = md5($_POST["password"]); $result = mysql_query ("SELECT * FROM users WHERE username = '$username' AND password = '$password' AND isadmin = '$isadmin'"); $isadmin = … | |
Re: in response to your question, your login script should look like this: [CODE]<?php session_start(); include 'dbconnect.php'; $username = $_POST['username']; $password = md5($_POST['password']); $query = "select * from registered_members where username='$username' and password='$password'"; $result = mysql_query($query); if(mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $_SESSION['username'] = $row['$username']; echo "Login Successful"; } else … | |
Re: could you try to explain a little better what you mean by: [QUOTE]as one count would have a number of lines?[/QUOTE] | |
Re: what exactly do you need? to build a table, the html, the php script? what? | |
Re: to reset a form you shouldn't use a submit button, instead use: [CODE]<input type="reset" value="Reset!">[/CODE] | |
Re: could you please try explain what you need a little more. I don't follow... you need a dropdown that shows which status a user has assigned, but status value is a numeric one (1,2) instead of a string ('admin', 'editor') ?? is that what you need? | |
| |
Re: i would do it like this: [CODE]<?php $con=mysql_connect("localhost","root","root"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db('master',$con); //(1) Read the text file into a variable $file = file("ATND.txt"); foreach($file as $line){ //(2) Then we can get rid of the tabs in there: $line = str_replace("\t"," ", $line); $fields … | |
Re: you could also use this: [CODE]foreach($_POST["names"] as $index => $strValue) { //$strValue will contain the value of the selected checkboxes }[/CODE] if you wish to keep track of your index... ;) | |
Re: i would recommend to use a pagination lib instead of making pagination yourself. I've used [URL="http://www.majordojo.com/projects/php-paginator.php"]PHP Paginator[/URL] a couple a times. It's a very simple pagination class, and very easy to use. | |
Re: i think you can use this, [CODE]Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.htm$ http://mysite.org/$1.php [R,NC][/CODE] this will redirect all *.html requests to [url]http://mysite.org/*.php[/url] i think you could can do the same with images... | |
Hi i'm trying to export a journal article with fpdf everything work's fine. But i can't seem to find a solution on how to align the article's two columns at the last page of the exported PDF. Any ideas? | |
Re: i would suggest fpdf at [URL="http://www.fpdf.org/"]http://www.fpdf.org/[/URL] i think it's the best php pdf lib out there ;) | |
Re: check database fields and check that your are closing the opened "(" next to values (can't find it on your code). | |
Re: [QUOTE=itisnot_me;1143770]ok so i was starting to make a query and thought that there could be a better way of making it. what i am trying to do it only print entries that does not have there value as null. ex: phone IS NOT NULL and street IS NOT NULL i … | |
Re: [QUOTE=azegurb;1143663]thank you for attention simply here the code what does mean i dont know[CODE]"$"."password = \$row['password'];\r\n". [/CODE] it is not possible to write in that format [CODE]"$password = $row['password']\r\n".;[/CODE][/QUOTE] no it's not... because you are printing between "". If you write the code the way you propose, what php will … |
The End.