345 Posted Topics
Re: lol you can't send emails directly from localhost, unless you installed an email system already, PHP need a working email system for it to work | |
Re: depend if you like it, you can do any project without MVC it's not really vital you should do MVC every project, there pros and cons on using MVC but i think the thing i like about MVC is the it's structure and workflow, with MVC your files are organized, … | |
Re: [CODE]$date = strtotime(date("Y-m-d G:i:s")."+30 days");[/CODE] ![]() | |
Re: no don't make a button for the search list view, it's much better if you just make them clickable, wrap them with anchors <a>, add id to link so upon clicking them, you will be redirected to it's detail view, where there you can display your positive and negative comments | |
Re: add a variable to catch the value of your your chosen item $tools = $_POST['tools'], then display the selected item via id [CODE]<?php $tools = $_POST['tools']; $server = 'localhost'; $user = 'root'; $password = ''; $mydb = 'Tools'; $table_name = 'Inventory'; $SQLcmd = "select * from $table_name WHERE id=".$tools; $connect … | |
Re: set your right timezone date_default_timezone_set('your_timezone'); [url]http://nl3.php.net/manual/en/timezones.php[/url] OR edit this on the your php.ini, ex. [CODE]date.timezone = "America/Los_Angeles"[/CODE] ![]() | |
Re: put this above html [CODE]$user = $_POST['compid']; $pass = $_POST['pword']; $db=mysql_connect('localhost','root','') or die('Cannot connect to MySQL!'); @mysql_select_db('dbriomra')or die('Cannot connect to database'); session_start(); $sql = mysql_query("SELECT * FROM login WHERE username = '".$user."'"); if(mysql_num_rows($sql)>0){ // login while($row=mysql_fetch_array($sql)){ if($pass==$row['password']){ // store id as session $_SESSION['id'] = $row['id']; echo "<script>window.location='/employee.php'</script>"; }else{ // password … | |
Re: lol, don't forget to terminate all statements with semicolon :D | |
Re: 1st you got to create a list view for person, you can list them up using <ul> then have them assign checkboxes each, then assign some id on every checkbox so you can specify which record to delete | |
Re: unlink works, if it doesn't then there's problem with your path, if you doubt it's functionality, try doing simple test, like unlink(test.php); putting unlink script and test.php into the same directory | |
Re: changed this [url]www.mywebsite.com/PB.php/offer=9384736[/url] to [url]www.mywebsite.com/PB.php?offer=9384736[/url], then use session, to identify who completed the offer by getting it's primary id | |
Re: there's nothing wrong with your code, have you tried alerting your content 1st? and where is your #rbox | |
Re: try this, just a revision to your code [CODE]<?php mysql_connect("localhost", "root", "test") or die(mysql_error()); mysql_select_db("testdb") or die(mysql_error()); $username = $_POST['name']; $country = $_POST['country']; if (isset($_REQUEST['Submit'])) { mysql_query("INSERT INTO users(name, country) VALUES('$username', '$country' ) "); or die(mysql_error()); } ?> <form method="post"> username<input type="text" name="name" value=""> </br> country<input type="text" name="country" value=""></br> <input … | |
Re: your new to PHP? but your doing joomla? for me, going directly to CMS is a bad choice for starters, it's better if you 1st familiarize yourself with the basic and native php before you go advance. joomla is framework and it's coding structure is not just typical function structures … | |
Re: basing on the title... want to get inside PHP? then you have to start at the basic, learn the native php then if you want to go advance learn OOP as most of frameworks are OOP ![]() | |
Hey guys anyone here know how to set-up virtual host on nginx? ive tried the manuals but doesn't work for me | |
Re: you got typo error, you type $did instead of $id changed this code [CODE]echo '<option value='.$did.'>'.$dname.'</option>'."\n";[/CODE] to [CODE]echo '<option value='.$id.'>'.$dname.'</option>'."\n";[/CODE] | |
Re: i can help you with that, but let me ask you 1st can you edit it's html? | |
Re: it doesn't matter if your incrementing your id or not, mysql_insert_id() always return the last inserted id | |
Re: relative paths: /directory -> root directory -> within the directory ../directory -> up one directory | |
Re: try this [url]http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm[/url] | |
Re: what count() did you use? php count or sql count? I assume you use the php count, so the reason why it displayed 1111111 is because you put the php count() inside the loop | |
Hi guys i need your help, i need to know how run PHP on nginx, i already installed it but it only reads html files not PHP, it will prompt download the php file. Im super new to this and the tutorial on the net's are complicated. btw im using … | |
Re: i can't understand your question ha ha, can you make it clear? :D | |
Re: i don't see something wrong with your code....what's the error? | |
Re: your dropdown <select> is outside the form, move that inside the form | |
Re: for me [url]http://www.w3schools.com/[/url] is the best! specially for starter, provides basic and simple example that is easy to understand :) | |
Re: [CODE]if(isset($_SESSION['web_user_id'])){ links to downloadable pdf }[/CODE] | |
![]() | Re: change this line [CODE]$w3 = mysql_query( "SELECT * FROM w3" ) or die("SELECT Error: ".mysql_error()); [/CODE] to [CODE]$w3db = mysql_query( "SELECT * FROM w3" ) or die("SELECT Error: ".mysql_error()); [/CODE] |
Re: i can't understand what your saying... well nevermind, 1st study how to select the data on your database [url]http://www.w3schools.com/php/php_mysql_select.asp[/url], then loop them on your dropdown field | |
Re: i think the xml DTD is conflicting with the php short tags, i think there are many solutions on this but try this quick fix [CODE]<?php echo '<?xml version="1.0" encoding="utf-8" ?>'; ?>[/CODE] | |
Re: 1st wrap your dropdown <select> with a form and add a submit button [CODE]$dropdown = "<form action='get'><select name='Test'>"; while($row = mysql_fetch_assoc($result)) { $dropdown .= "\r\n<option value='{$row['Test']}'>{$row['Test']}</option>"; } $dropdown .= "\r\n</select><input type='submit' name='submit' value='submit' /></form>";[/CODE] then update your second query [CODE] $query2 = "SELECT * FROM tests WHERE id='".$_GET['Test']."'"; $result2 = … | |
Re: try this, name this .htaccess and put it to root [CODE]Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteBase / RewriteRule ^article/(.+)/([0-9]+)$ article.php?product=$1&side=$2[/CODE] btw this code only works for that certain pattern article.php/watever/watever, because im also a newbie on htaccess im just still reading right now on the basic parts, maybe the … | |
Re: earning master's degree in school doesn't help you, they only teach you a bunch of theories and basic stuff. if you want to be an excellent developer you gotta experience working on real projects like working on a company or freelance. there you will hone your skills | |
Re: basing on your error, then that means you haven't entered the required fields, i.e. firstname | |
Re: it's not possible to call the function buildModels(); from the javascript events onChange because it's a php function, and php is a server-side, it requires page load, unless you use AJAX. | |
Re: try this [CODE]$sql = "Select * from table_name where age = 10"; $result = mysql_query ($sql,$con) or die (mysql_error()); $countrows= mysql_num_rows($result); while ($row= mysql_fetch_array($result)) { $list[] = $row['firstname'].','.$row['lastname']; } $file = fopen("files/ExampleDAT.DAT","w"); foreach ($list as $line) { fputcsv($file,split(',',$line)); } fclose($file); [/CODE] | |
Re: so what's the problem? this works fine | |
Re: put this before the </head> [CODE]jQuery("#entersite a").hover(function(){ jQuery("#entersite a").css("position","relative"); jQuery(this).animate({left:"100px"}).fadeOut(function(){ jQuery("#entersite a").css("left","-100px").fadeIn().animate({left:"0px"}); }); });[/CODE] | |
Re: it's possible, just design your database schema to accept pictures and link the seats and people tables via foreign key | |
Re: [QUOTE=Zhoot;1754370]date("l jS \of F Y h:i:s A") = Maybe the quotation marks are causing the issue? either change them into single quote ' or put the format in an string and put the string there instead. I used to have this issue and removing the Date("") from the query most … | |
Re: maybe it was just deleted on your gallery(assumed) list table, but not in your main image(assumed) table, try creating another database query to delete it you're main table, and if your you want to delete the image file from your folder, thin use [URL="http://www.w3schools.com/html/html_forms.asp"]unlink[/URL] | |
Re: 1st u need to be very rich in order to develop your own web browser... even if you do know how to develop it... but it takes manpower to develop such a big project! I know u want to develop a web browser for for your country India. well it's … | |
Re: firefox is the best! specially in web development! because of it's cool add-ons like firebug. can't live without it. | |
Re: a bad database design. If you have a field that stores multi values, you should not store them in 1 field comma separated. You should make another table for it. A one-to-many relationship and link them via foreign key. | |
hi guys i need help, i don't know what's the cause of this but somehow the page only loads 2 jwplayer videos and a white screen on mac google chrome. please help :( [url]http://masterbeing.com/nb/yoga-kurs-film-lp[/url] | |
Re: maybe because in the first place it didn't satisfy your if statement [CODE]if($dbpasswword == $passwd)[/CODE] because if it does, it should redirect... i don't see anything wrong on the php header() function |
The End.