- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 8
- Posts with Upvotes
- 8
- Upvoting Members
- 7
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
65 Posted Topics
Re: Sorry for not noticing this earlier. I try to go back to the unanswered threads but as I'm new to this site and that the php forum tends to be VERY active, it's hard sometimes to go back through and look at them all... especially when once some get their … | |
Re: This should get you going in the right direction. [url]http://www.google.com/search?q=mailing+lists+php[/url] [url]http://www.google.com/search?q=mailing+lists+php+tutorial[/url] [url]http://www.devshed.com/c/a/PHP/Creating-a-Mailing-List-Manager-with-PHP/[/url] | |
Re: No, after line 7 put in [b]print_r($_POST);[/b], though I highly recommend (for readibility until you understand what print_r() actually looks like) doing [b]echo"<pre>";print_r($_POST);echo"</pre>";[/b] instead. print_r() will display the $_POST array onto the page in an array style format so you can see what is actually within the array. In this … | |
I'm not sure if this should go in this forum or not so please move it accordingly if necessary. I was wondering how difficult it would be to implement code highlighting. Personally I like to show the person where their errors might be or are without giving them a direct … | |
Re: The back button tries to reload the previous page exactly as it was. Theoretically it should refire the php but given I've never had this problem, or tried doing it this way, I can't say it will work perfectly. This is also a js problem, not a php as php … | |
Re: Simply reverse the 2 lines. [code=php] <?php session_start(); require_once("functions.php"); ... ?> [/code] Or if that is not an option, use ob_start() and ob_flush() at the top and bottom, respectively, of your page. [code=php] <?php ob_start(); require_once("functions.php"); session_start(); ... ob_flush(); ?> [/code] | |
Re: I'm no expert on classes in php but from what I have seen and used, shouldn't line 19 be something more like [b]$curadd = $current->curPageURL();[/b] and thus changing line 21 to [b]if($curadd == $address2) {[/b]? Please correct me if I'm wrong. ![]() | |
Re: I've tried doing this several times myself and I've only come up with one reasonably efficient method of doing this: [code=php] $keys = array_keys($_POST); for($i=0;$i<count($keys);++$i){ $value = $_POST[$keys[$i]]; } [/code] $_POST is not an indexed array so it's impossible to iterate generically through it. Another potential method that might work: … | |
Re: Display_errors can only be set to 0 (off) or 1 (on), E_ALL is for the setting error_reporting. Also some hosts disable ini_set() for security purposes, have you tried placing a php.ini file, with the single line of [b]display_errors = 1[/b] in the same directory of the file that's not working … | |
Re: [url]http://www.php.net/manual/en/function.array-combine.php[/url] | |
Re: Misread but cannot (or don't know how to) delete, apologies. | |
Re: Perhaps because no one has the answer hmm? If it's that pressing and you don't mind feeling like an idiot... [url]http://stackoverflow.com/[/url] [Steps to solve almost every problem] 1. Look at the code, piece by piece. 2. Try an alternative method to doing what you want to do. 3. Look up … | |
Re: There are 2 simplistic ways. The first and most recommended is the header redirect: [code=php] header("Location: pagename.php"); [/code] That sends the header location to the browser, telling it to redirect itself to whatever you replace pagename with. The second, less elegant way: [code=html] <meta http-equiv="refresh" content="2;url=pagename.php"> [/code] Where 2 is … | |
Re: As you're dealing with javascript, you can easily load the page up that's not working properly and view the source. Or even in most browsers, you can click and see if the javascript is erroring at all. Just for curiosities sake, have you tried viewing the page source for the … | |
Re: Exclusion from rand is usually not a good idea as it makes things incredibly difficult rather fast (at least from my own experiences). In your file thing above, loop through each file and add each one to an array: [code=php] // PSEUDO CODE!!!!!!!!!!!!!!!!!! foreach($file found in $directory){ if(!in_array($file,$directory){ $array[] = … | |
Re: After line 18 in login.php [code=php] // THIS CODE ASSUMES YOU HAVE A COLUMN NAMED ID FOR THE USERS ID NUMBER $u = mysql_fetch_assoc($q); $_SESSION['id'] = $u['id']; $_SESSION['username'] = $u['username']; [/code] Once you have done that, in your main.php you will be able to access their username and anything else … ![]() | |
Re: [QUOTE=qazplm114477;1334053]so if I understand correctly, when you choose a house from the first drop down menu, you want the second drop down menu to populate with the rooms it has? [b]If you want to automatically populate the second menu (rooms) without "submitting", you'll have to use javascript along with AJAX.[/b][/QUOTE] … | |
Re: You are running the query twice. Once on line 18 and again on 21. Remove line 21, edit variable names to reflect changes and it should work. A future error on line 18: [b]mysql_query( "UPDATE newbase2 SET lname = '".$lname."', fname = '".$fname."', mname = '".$mname."', age=[u]'".$age.", '[/u]gender = '".$txtgender."', … | |
Re: After an exhausting 60 seconds of googling, this is what I found. [Links] [url]http://www.google.com/search?q=listing+directories+and+subdirectories+in+php[/url] [url]http://www.webmaster-talk.com/php-forum/41811-list-files-in-directory-sub-directories.html[/url] [url]http://php.net/manual/en/function.opendir.php[/url] | |
Re: That's inserting, not selecting (or fetching as previously mentioned). Why not just add those fields into your checks on line 15? Though the response that qazplm114477 gave should do the same though I'll reiterate what he stated. If you insert the field into the database with an empty string, it … | |
Re: [QUOTE=BzzBee;1335976]I made this title because if the thread contains title with tough problem, no one even open thread and try to help.[/QUOTE] Definitely not true and if that has been your experiences in the past with daniweb then that's simply ridiculous. However, onto your question. The only [b][u]theoretical[/u][/b] (I stress … | |
Re: That's why I try to avoid cookies except to hold generic information that the scripts only reference or if they do require, cross-reference before using (e.g. it stores username/id/joined-date (unix timestamp, makes it incredibly hard to guess), check to see if all 3 pieces match up, if not, log them … | |
Re: If it doesn't 404 then the propagation is most likely done. Check to make sure you're index.php is working properly, e.g. edit the page from server side to confirm what is on the server side is what you want. Another thing to check, if you're on a windows server, is … | |
Re: I know this is old and I know I'm barely into this myself but you might want to check into jQuery if you're thinking web based and are leaning away from flash/java. It's very efficient and a lot of games are starting to come out with jQuery as the basis … | |
Re: I've never used phpNuke before but if it operates in roughly the same manner that php does then requiring a field to be submitted does not happen on the database(sql) side, it happens during the "error checking" of the form being submitted so you can tell the user that not … | |
Re: What exactly are you trying to accomplish here? This is also javascript, specifically jQuery, not php. | |
Re: What does your code look like? You don't have to post the full thing but posting the possible problematic areas would be very helpful. [Edit] And if you do, [b][u]PLEASE[/u][/b] remember to wrap it in the code tags. | |
Re: I use Uniform Server as a development platform for all my web design. It's light weight and copies how a real server would run. It's perfect for development... and it comes with PMA (PHPMyAdmin). [Links] [url]http://www.uniformserver.com/[/url] | |
Re: I don't usually give out answers to homework as you're suppose to be learning this so here's a hint: tr = table row, td = table data (a cell), th = table header. If you need to make everything vertical, what is causing you to have 2 rows right now? … | |
Re: Change [b]$select_query2 = "SELECT * FROM EmployeeBirthdayDetails Order By E_ID";[/b] to [b]$select_query2 = "SELECT * FROM EmployeeBirthdayDetails Order By E_ID ASC";[/b] | |
Re: Well for one, javascript is client side, not server side so what you're trying to do here isn't really feasible. Though I don't understand why you just don't translate it from javascript into php and have it just echo back that they need to swipe it again as the two … | |
Re: [Links] [url]http://www.google.com/[/url] [url]http://www.tizag.com/[/url] [url]http://www.w3schools.com/[/url] [url]http://www.uniformserver.com/[/url] | |
Alright I was given a link ([url]http://support.microsoft.com/kb/195192[/url]) along with [b]InternetSetOption(0, INTERNET_OPTION_END_BROWSER_SESSION, 0, 0);[/b] and told it should force 2 browsers in the same application to use 2 different cookies. I ran it through the code translator and got the following. [code=c#] const int INTERNET_OPTION_END_BROWSER_SESSION = 42; [DllImport("wininet.dll", EntryPoint="InternetSetOptionA")] private static … | |
Re: Because that's all the page will ever be is html. You can't view php from a regular website, unless you're using phps, as all the php is processed server side. In short, the client (your browser) never sees the php so it can't print or display something that it can't … | |
Re: To directly add onto aquilax's code: [code=php] AND postcode = $postcode LIMIT 5 [/code] | |
Re: I'm not seeing how this could be possible though out of curiosity, what's the goal of this? | |
Re: You have all the tools and information you need to be able to figure this out. Everything you need is already on the script you just posted. | |
Re: I'm not entirely sure why hielo decided to use [b]$file=dirname(__FILE__) ."/form_output.txt";[/b] on line 5 instead of just [b]$file="form_output.txt";[/b] but that should fix your problems though this also confuses me. [code=php] if( file_put_contents( $file, $data, FILE_APPEND) ) { echo "unable to write to file. Verify path and permissions"; } [/code] If … | |
Re: [QUOTE=chuckwilliams11;1326671]I am not understanding why my scripts the exact same scripts work fine on my current host, but getting this error and page loads half-way on the new host...any further insight would be greatly appreciated...[/QUOTE] nevvermind gave you the answer and seeing as you posted a single line that has … | |
Re: To address a possible future error, though I have no idea how you have oci set up but line 9 seems a little redundant as you're doing that on line 12 anyway and depending on how you have oci setup, this could cause the fetch_array to move the pointer ahead … | |
Re: The biggest con I can think of for the first method would be the volume of files you potentially could end up with as you would end up with hosting 2 files for every 1 you had. This has the potential of being rather costly on hosting space as well … | |
Re: This should get you started in the right direction. [code=php] <select> <?php $result = mysql_querey($query,$con); while($row=mysql_fetch_assoc($result)){?> <option value="<?=$row["student_id"];?>"><?=$row["student_id"];?> - <?=$row["student_name"];?></option> } ?> </select> [/code] | |
Re: I hope I'm understanding the question correctly though I'm definitely not versed in this area but based on what I do know is that the applications need to be able to find each other using some method. Most applications use a central server with an IP address(es) that does not … | |
Re: I don't know any realistic level of C++ but it sounds more like you're having concept and or design issues. To better understand the question at hand, what is it you want to accomplish and how are you approaching it? | |
Re: [QUOTE=hielo;1325825][CODE=php] <?php $start = strtotime("{$startdate} {$starthour}:{$startmin}"); $end =strtotime("+{$hour} hours +{$minute} minutes",$start); echo 'Start Time'. date('Y-m-d H:i:s', $start); echo 'End Time'. date('Y-m-d H:i:s', $start); ?> [/CODE][/QUOTE] I'm not entirely sure on this as strtotime() isn't my most used function but are the curly brackets you're using within the strtotime() function really … | |
Re: [code=php] <?php session_start(); if (isset($_GET['beginCount'])) $_SESSION['countView'] = true; if ($_SESSION['countView']) $_SESSION['count']++; if ($_SESSION['count'] % 5 == 0) { echo "test"; } ?> [/code] [code=html] <a href="index.php?act=generate_quotes&beginCOunt&cb=<?php echo time();?>" class="main_control">Generate</a></p> [/code] You can move [b]if (isset($_GET['beginCount'])) $_SESSION['countView'] = true;[/b] and change it to [b]$_SESSION['countView'] = true;[/b] into your function if you … | |
Re: A couple, and they are free. [url]http://www.tizag.com/[/url] [url]http://w3schools.com/[/url] | |
Re: Apologies if you read what I posted first. It was entirely wrong. [Edit] Your num[] variable is never defined. In C# you have to define it as an array before you can use it. E.g. [code=c#] int[] num; for(i=1;<i<6;i++){ ... } [/code] But this will also fail as num is … | |
Re: Parse errors come with the line number they errored on. It makes it easy to debug problems this way. |
The End.