- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 12
- Posts with Upvotes
- 12
- Upvoting Members
- 9
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
83 Posted Topics
Re: @ChaosKnight... Agreed in the terms of not having to reinvent the wheel. But some of us just like to know how the wheel works first :) @Vribium... Google is your friend :) | |
Re: Squidge is correct, you do not set these values in your form. You need to go back to your form and set them <input type="text" name="Departments" /> <input type="text" name="UserId" /> <input type="password" name="Password" /> <input type="password" name="RetypePass" /> This is not found anywhere in the code you have provided | |
Re: I too have the same problem, I just dual boot windows and Linux. My windows installation only consists of iTunes for my phone and games that will not run on Linux. I only boot into windows when I have to. If you only need it for the iPod/Galaxy Tab I … | |
Re: you will need to post all of your code. But it sounds like the problem is after your code to insert into the database. Id start there. | |
Re: Also to add to diafol's comment, you could add a `die()` statement after your `mysql_query()` $sqlb = mysql_query("SELECT SUM(projb.amunt) AS totalpsamt, SUM().... AS .... FROM projb INNER JOIN proja ON projb.projid = proja.projid INNER JOIN parti ON proja.parid = parti.parid INNER JOIN pstotal ON proja.projid = pstotal.projid WHERE proja.projid = … | |
![]() | Re: you cannot output before you use `header()` remove the `echo "Unauthorized access";` and it should work. you could set a `$_SESSION['message'] = "Unauthorized access";` and display it on the next page. don't forget to unset it once you have displayed the message though. |
Re: My advice is to think about what you want to acheive and use the [PHP Manual](http://php.net/manual/en/index.php) to learn what you need. It will help a lot if you have previous programming experience with other languages Good Luck! | |
Re: have you attempted it on your own already? post your code... | |
Re: sounds like the query may be incorrectly constructed. I like to put put a bit of debugging after my SQL queries <?php ... $result = mysql_query($sql) or die("Error: ".mysql_error()."<br />Query: ".$sql); ?> That will output any SQL errors you have and also the query you used. I find that helps … | |
Re: Or you could use [fputcsv()](http://php.net/manual/en/function.fputcsv.php) | |
Re: I would use a while loop instead with a switch that would allow you to specify whether you want to include the first row. <?php $countFirstRow = false; while ($data = fgetcsv($handle,1000,",","'")) { if (!$countFirstRow) { // go back to the start of the loop to the next line. continue; … | |
![]() | Re: this will give you the result you want: `$todayDate = date("l, F d, Y, g:ia");` |
Re: Why don't you want to use an array? | |
Re: `array_unique()` could be what you are [looking for](http://php.net/manual/en/function.array-unique.php) | |
I am delving into trying to understanding how the MVC structure works. I am following a [tutorial](http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/) and a little bit down the page where is is explaining the Controller class and how it initiates the Model and View there is some code there that does not quite look right … | |
Re: This sounds like a CSS problem rather than a php problem. You would probably have better luck posting in the [Web Design, HTML and CSS section](http://www.daniweb.com/web-development/web-design-html-and-css/15) Can't speak for other folks around here but CSS is not one of my strong points | |
Re: Is there more to this file? the line numbers are not matching what you have posted? are you including this file from another file? ![]() | |
Re: Does this need to be in a text file? Do you not have access to a database? You would avoid a whole range of problems if you were able to put it all in a database... | |
Re: try if ( mail($to,$subject,$message,$headers) ) { header("Location: page.php"); } else{ // do something else } | |
Re: Further to zeroliken, was caps lock on when you entered the admin password when you initally installed Ubuntu? The password may be different to the one you log in with./ For security purposes it should be. | |
Re: looks like there should be more code for this. All I can tell you about this so far is that is is; - Looping through an array called `$search_exploded` placing each value into the variable `$search_each` - It then adds 1 to `$x` (assuming that is was previously defined) - … | |
Re: I'm only noob-intermediate when it comes to linux but wouln't you also need to go back into the /etc/sudoers and change jones to `jones ALL=(ALL) ALL` so that jones cannot just login to root with out a password? After you have changed both the root and user (jones) passwords of … | |
Re: Google will pry into your life not matter how much you try and stop them.... Just sayin | |
Re: sounds like you are trying to type the file path directly into your browser. Is insalled on your local machine? just type http://localhost/ or if it on a remote computer http://192.168.0.5 (or what ever the ip address of the server is.) | |
Re: I think you may need to do some research on the Javascript onunload & onbeforeunload events. Maybe have them call an ajax function. here is an [example](http://stackoverflow.com/questions/3888902/javascript-detect-browser-close-tab-close-browser) of the usage. | |
Re: You need to be passing the code into the javascript from a .php file Lets say you have index.php and in the header you have your .js file referenced When I need to pass a value from PHP to javascript I usually need it for a function for an onClick … | |
Re: Check the PHP manual on [strtotime](http://php.net/manual/en/function.strtotime.php), make sure you read the notes though as the format of your string can affect the results aslo [strftime](http://php.net/manual/en/function.strftime.php) to reverse it | |
Re: [QUOTE=OmniX;1045849]I was reading up on salts and the consenses is that as long as they are used to stop precomputation attacks (aka rainbow tables, etc) the length required is meaningless only the value of the salt, which should be randomly constructed. This statement correct? PS: now dont be trival and … | |
Re: [QUOTE=gdrsujit;876565]Hari om Can anyone please help me in PHP coding[/QUOTE] Here is a good resource where i learned a lot from. It is a good start [url]http://www.tuxradar.com/practicalphp[/url] | |
Re: mysql_real_escape_string(); will prevent injections. e.g. [code=php] <?php $string = 'user input'; $safer = mysql_real_escape_string($string); // the variable $safer is less likely to cause you any problems from your users input. ?> [/code] it is always best practice to hash your passwords as well {sha1($string) }. when you create the user, … | |
Hi All, I have been doing a little VBA in excel and I am tring to work out how to add 2 hour {or any amount of time} to the current time. Google has failed me in finding the answer, most of the things i have found is formulas but … | |
Re: [QUOTE=mrjoli021;1052599]my else statement is not executing it returns a black page. [code] while($results = mysql_fetch_array($user_name)) { if ($results['email'] == $Entered_UserName && $results['password'] == $Entered_PassWord) echo 'working'; else echo 'not working'; } [/code][/QUOTE] should be [CODE=php] <?php while($results = mysql_fetch_array($user_name)) { if ($results['email'] == $Entered_UserName && $results['password'] == $Entered_PassWord) { echo … | |
![]() | Re: [QUOTE=feddie1984;1050627]Hi All, I have the following code: [CODE]$requester_email = $_POST['requester_email']; $requester_name = $_POST['requester_name']; $todays_date = $_POST['todays_date']; $Start_Date = $_POST['Start_Date']; $End_Date = $_POST['End_Date']; $Department = $_POST['Department']; $No_Engineers_Required = $_POST['No_Engineers_Required']; $Prefered_Engineers = $_POST['Prefered_Engineers']; $Customer_Name = $_POST['Customer_Name']; $Location = $_POST['Location']; $Type_Of_Job = $_POST['Type_Of_Job']; $Job_Ref_No = $_POST['Job_Ref_No']; $Additional_info = $_POST['Additional_info'];[/CODE] The help I need … ![]() |
Re: it would also be a good idea to place the delete from database call inside an if statement, that way if the file delete fails you will still have the database info. That kind of coincides with ardavs comment. [CODE] <?php if(unlink($file)) { // delete info from database } <? … | |
Re: [QUOTE=iraberyl;1049744]hi, got a new prob, how can i create a php page that automatically refreshes each time i access the page.[/QUOTE] I'm sure you dont want to cuase an infinite loop. What are you trying to do? | |
Re: [QUOTE=Muazam;1047325]Why doesn't this work? I choose English and it doesn't do anything... neither does Norsk work. Anyone help please, thanks. [CODE]<?php //nodag = Norwegian day //endag = English Day // dag = day if(!isset($GET_['ok'])) { //start if ?> <form action="" method="get"> <select name="lan"> <option value="eng">English</option> <option value="no">Norsk</option> </select> <input type="submit" … | |
Re: [QUOTE=levsha;1049636]I have an HTML form with three dropdown selects: month, day and year. I have four fields in my MySQL table: month, day, year, and date. The 'date' field is supposed to contain the concatenated values of the year, month and day separated by dashes. I write this in my … | |
Re: [QUOTE=elanorejoseph;1048412][CODE]hi how can i make a drop down menu usibg java script.... please help its urgent[/CODE][/QUOTE] They are normaly done in HTML. [CODE=html] <html> <body> <select name="menu"> <option value="opt1">Option 1</option> <option value="opt2">Option 2</option> <option value="opt3">Option 3</option> </select> </body> </html> [/CODE] Is that what you mean? Please be more specific if … | |
Re: [QUOTE=OmniX;1045640]I was stuffing around and I was wondering if it was at all possible to make a function or method, dynamic at all? In what context? well I would like not to have the specify the elements required by the function so at any given day it can be more … | |
Re: I agree I am currently learning AJAX and all you need to Google. a good site for the fundamentals is [URL="http://www.w3schools.com"]http://www.w3schools.com[/URL] | |
Re: [QUOTE=futhonguy;1044605]Hi, Currently i have 3 Tables - A, B and C. All 3 tables have their unique IDs (which are auto increment) and Table B and C are a foreign keys to Table A. says: Table A = A_id, A_fname, B_id, C_id Table B = B_id, B_add, B_pcode Table C … | |
Re: [QUOTE=veledrom;1038889]Hi, index.php posts data to process.php I want users to remain in index.php when they summit their form. I have seen this in some websites but don't know hot it done. Can anyone help me? Thanks[/QUOTE] All you need to do is submit the page to itself from the form … | |
Re: [QUOTE=sam023;1042803][code=php] include_once('session.php'); include_once('config.php'); $userid = $_SESSION['userid'] ; $uname = $_GET['uname']; $query= "call sp_active('$uname','$userid',@u_active)"; $result = mysql_query($query) or die('query_error'.''.mysql_error()); if($result) { header('location:vagent.php'); } [/code] simple php code.. but still throwing Cannot modify header information - headers already sent by i have also use ob_start(); but of no use[/QUOTE] I take it … | |
Re: [QUOTE=Carrots;1043226]Hi, I was wondering why the CREATE TABLE query in my code seems to be called automatically, whilst in the example below from w3schools, there is a line which explicitly calls the CREATE TABLE query. Why is that the query in the w3schools example isn't ran twice? My code: [code=php] … | |
Re: [QUOTE=Graphix;1003300]A few suggestions: - How to debug your code - How do you use an include() and how do you acces files beneath the webroot? - How do you secure your site, what techniques can be used and what shouldn't you do. - When should you use sprintf(), printf(), print(), … | |
Re: [QUOTE=mrjoli021;1042061]i have a class called sqlConn.php within the same directory as hiuser.php how do i call that class. [code] include('sql_Conn.php'); $sql = new sql_Conn; [/code] does not work i get Warning: include(sql_Conn.php) [function.include]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10 Warning: include() [function.include]: … | |
Re: [QUOTE=Designer_101;1042224]Hello This isnt the right forum for this im sure however I cant find the correct one as its a vague question. Im sure someone in here knows the anser to it though. I've designed a countdown system in flash/php that rotates a wheel and stops on a certain object … |
The End.