Different Between Index.php And Index.php?quizname=?
What is the difference between index.php and index.php?quizname=???.
Why my timer cannot work when i used index.php?quizname=??? Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Index.htm Going To Login Page And Sending Back To Index Page
1: A visitors visits a.html page. decides to login and post comment. goes to login page and logs in then I want to send him back to a.html page how do I do that? Here is my login page and login.php page. 2: Same as above but I want to send them back after some time... while I make them view the error, why they have not been able to login. Code:
Which Index To Use - Primary Key, Index, Etc
I have the following tables (simplified example): countries: code_country (char-4) , name_contry) breweries: code_brewery (int-4), name_brewery) coasters (code_coaster (char-8), description, code_country, code_brewery) code_coaster is formed by the combination from code_country + a correlative number: for example CH-33, INDO-102, etc How should I define the indexes so that the querries will be optimized? I've thought about the following: code_country: unique in table country code_brewery: unique in table brewery code_country: index in table coasters code_brewery: index in table coasters code_coaster: unique in table coasters I don't really understand the difference between primary key and unique. Should I use primary key instead of unique?
Index.php
I want to land on www.domain.com/index.php when I type in www.domain.com. I have a virtual server. Is redirection in the webserver configuration the way to do it or is there a better way. I tried redirection but it didn't seem to work. Maybe the changes hadn't been logged after rebooting the virtual sever.
Index.php
How can I get a server to show index.php as it would index.html? When I save index.php it just shows the directory, I'm administrator of an Apache Server and I'm not of a (I think, it's what www.awardspace.com uses) a goDaddy server. Can anyone help me with this? Can it be done?
Complex Name Index
I've not found anything that relates to this problem and I posted it and in the MySQL forum and got no replies. Maybe there are more ideas here. I want to display an alphabetical index from a table where each row contains information about a couple, i.e., lastname, hisfname, herfname, maidenname. The index should display both the man's name and the woman's maidenname in the same list. Here's a sample of my table: lastname | hisfname | herfname | maidenname smith | john | jane | cook riley | dan | sally | price bagley | bill | donna | davis green | graham | susan | richards From this sample I'd like to extract an alphabetical list like the one below: bagley, bill cook, jane davis, donna green, graham price, sally richards, susan riley, dan smith, john What sort of query could I run to get this order? Can I use two queries and somehow join them to form a single list? Or is there some PHP algorithm I should employ to derive the list from two queries?
Index.php?action=1 Etc
just wondering how i could make a php page which has say an output like index.php?action=1 all it has to do is goto another webpage - so if i had URL then the user is taken to another page and so on for index.php?action=2 / index.php?action=3 / etc
Undefined Index
Notice: Undefined index: name in F:uniSoftware engineeringassignment4guestbook.php on line 6 the variable $name is declared as $name = _POST["name"]; What could be causing this? I've recently installed php 5 on IIS with mysql 4. All running on windows XP downloaded code straight from my uni's tute site. went to run it and it sort of runs but I get these errors at the top of the page.
Index.html?etc=foo
I've noticed on some sites that people are passing variables to HTML files using the GET method. How can you set up HTML files to accept variables? Or have they just set their server up so that all .html files get parsed by the PHP/Perl/whatever engine?
Undefine Index,
I installed php4 for apached and restart apache afterward. but my little php script generated error followint error: PHP Notice: Undefined index: myname in /usr/local/www/data-dist/www.authtec.com/php-test.php on line 2 I was trying to run the following php script in apache: <?php if($_POST["myname"]) { print "Hello, ".$_POST["myname"]."<p> " .nl2br($_POST["textbox"]); } else { ?> <form method="post" action="php-test.php"> <input type=input type=text name=myname> <textarea cols=20 rows=4 wrap=virtual name=textbox></textarea> <input type=submit value="Submit"> </form> <?php } ?>
Index.php...bootstrapping?
I want to write an index.php the is the central point of my website. I see it used everywhere, but I can't seem to figure out a good way to do it. I found an article on Zend's website where it refers to this as "Bootstrapping". Is this correct? The article comes in parts, and unfortunately the author hasn't finished all the parts. I thought I'd throw it out there for discussion, see if we can come up with a few examples, from simple to complex ones. I would imagine this can all be done in an OOP way for the more complex ones.
Index.php Does Not Open Up
in PHP and I am enthusiastically trying out things. I've just replaced my index.html ( file with index.php with of course a few lines of php code, which I am sure they are all correct as far as the syntax goes. I expect the file (index.php) to be loaded in to the browser window upon launching the browser. It's not doing that; instead, it loads the apache index file. (Oh, I forgot... I am running php 5 and apache 2.xxx and modified idex.html to indexHtml.html to avoid the webserver serving the page). I guess that I need to insert a line somewhere in the apache config file but I don't how...
'defaultpage' Index.php
i am pretty sure that i need to use this php script but how do i use it? i know 'defaultpage' should be index.php. PHP Code:
Undefined Index
Reference the above thread: "Passing a HTML variable to a PHP file using include". One thing I've learned over the years is that an error doesn't always come from where the compiler/interperture says it does. Case in point maybe. I am getting this error: Notice: Undefined index: var1 in /var/www/vhosts/texasflyfishers.org/httpdocs/form.php on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/texasflyfishers.org/httpdocs/form.php on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /var/www/vhosts/texasflyfishers.org/httpdocs/form.php on line 6 in this function: <?php if($_GET["op"] == "ds") { foreach ($_GET["name"] as $key=>$value) { $fp=fopen($_GET["var1"],"a"); fwrite($fp,$_GET["name"][$key] ." ". $_GET["email"][$key] .." ". $_GET["phone"][$key] ." ". $_GET["id"][$key]); fclose($fp); } } ?> 'var1' comes from this last line in this snippet in a previous function: <html> <body> <?php include ($_GET["var2"]); ?// this works <br clear="all"> <?php include ($_GET["var1"]); ?//this works <form action="form.php?var1=>($_GET["var1"])" method="GET"// NOT I have found that the text editor you are using will color out the parts of code if they are correct. This code does not color out evenly. In the 2 'include' statements '$_GET' is red. In the 'form action' statement it is not. At this point 'var1' is a name on a disk with zero length. Is it possible that the error trapping of the 'include' function is taking care of this and the error trapping of the 'fopen' alerts you that it is going to crash fwrite because 'var1' is now corrupted?
Get Type Of Index
is there a way (function) whereby I could get hold of a particular table index type? It's funny because when I use Show fields to get records of my tables, I can get PRI (Primary Key), UNI (Unique) but after the first two field, other index I get is stated as MUL. What's wrong with that? I'm not sure what's MUL maybe it stands for Multiples? But that's one field only consist of unique index but it show MUL. How can anyone explain?
Undefined Index
I have a simple search feature that searches 3 fields in 3 separate tables in a MySQL db, and I'm getting an 'undefined index' error, but only in the first section (first table)of the results. The undefined index is tied to the docs.projID in the "if ($row_search['docs.projID'] == 1)". This if statement is there to control to format of the link as pages are in different depths of subfolders depending on security needs. Googling this sort of error seems to reflect problems with the $_POST['keyword'] not existing when the results are first listed, so I moved the PHP results code from it's own page (search.php) to the main page, which didn't help. I have tried several different things and can't seem to get it working right. Here is what I have: Form: <form id="search" name="search" method="post" action="<?php echo $currentPage?>"> SEARCH<br /> <input name="keyword" type="text" size="20" value=""/> <input type="image" name="Submit" src="images/team_icon_go_btn.gif" /> </form> Results: <?php if (isset($_POST['search'])) { $keyword = $_POST['keyword']; mysql_select_db($database_website, $website); $query_search = "SELECT Distinct docURL, docTitle, docDesc, docs.projID, groupCode, projCode, catName FROM docs JOIN subcat on subcat.subcatID=docs.subcatID JOIN cat on cat.catID = subcat.catID JOIN groups on groups.groupID=proj.groupID JOIN proj on proj.projID=docs.projID WHERE proj.projID=docs.projID AND docURL LIKE '%$keyword%' OR docTitle LIKE '%$keyword%' OR docDesc LIKE '%$keyword%'"; $search = mysql_query($query_search, $website) or die(mysql_error()); $row_search = mysql_fetch_assoc($search); $totalRows_search = mysql_num_rows($search); $proj = $row_search['projCode']; ?> <?php if ($totalRows_search < 1) { echo "No internal documents matched your request."; } else {?> <p><table width=95%> <tr><td colspan="3"><font size="+1">Internal Documents:</font></td> </tr> <tr> <td><strongLink </strong></td> <td<strong>Description</strong></td> <td<strong>Project </strong></td> </tr> <?php do { ?> <tr> <td> <a href="<?php if ($row_search['docs.projID'] == 1) { echo $row_search['catName']."/".$row_search['docURL']; } else { echo $row_search['groupCode']."/".$row_search['projCode']."/".$row_search['catName']."/".$row_search['docURL']; ?>"><?php echo $row_search['docTitle']; } ?></a></td> <td><?php echo $row_search['docDesc']; ?></td><td><?php echo $row_search['projCode']; ?></td> </tr> <?php } while ($row_search = mysql_fetch_assoc($search)); ?> </table> <?php }?> </p> <?php mysql_select_db($database_website, $website); $query_search = "SELECT Distinct toolURL, toolName, toolDesc, tools.projID, projCode FROM tools JOIN proj on proj.projID=tools.projID WHERE toolURL LIKE '%$keyword%' OR toolName LIKE '%$keyword%' OR toolDesc LIKE '%$keyword%'"; $search = mysql_query($query_search, $website) or die(mysql_error()); $row_search = mysql_fetch_assoc($search); $totalRows_search = mysql_num_rows($search); ?> <?php if ($totalRows_search < 1) { echo "No tools matched your request."; }
Corrupt Index.php
we are having a problem with our index.php file. our webhost says that it is corrupt, but i am not sure how to fix this - i am completely new to this the message we get when we try to access the site is: Fatal error: Cannot redeclare getfields() in /home/cust1/usr1127/html/management/lib/db/record_set.class on line 225 any help would be very much appreciated! i've tried to upload an old version of the file, but that obviously didn't work.
Undefined Index: Id
I have a website online which I have taken offline to work on it, but when I load the pages, I get the error Notice: Undefined index: id in C:wwwwebconnectwebsitedata.php on line 5 Code:
Undefined Index ?
I have some code with a problem. The code is: 1. <?php 2. $initStartLimit = 0; 3. $limitPerPage = 10; 4. $startLimit = $_REQUEST['startLimit']; 5. $numberOfRows = $_REQUEST['rows']; 6. $sortBy = $_REQUEST['sortBy']; 7. $sortOrder = $_REQUEST['sortOrder']; The errors starts with row 4: Notice: Undefined index: startLimit in *** on line ** Notice: Undefined index: rows in *** on line ** Notice: Undefined index: sortBy *** Notice: Undefined index: sortOrder in *** The code was created by "phpCodeGenie" and works fine on my webserver, which has php version 4.4.4 and mySql version 4.1.21 I just installed easyPHP on my home computer which has php version 4.3.10 mySql version 4.1.9 The errors only show up on easyPHP. My guess is that phpCodeGenie defined these indexes. How can I define them in EasyPHP ?
Passing The Whole Index Value From The List Box
I've got a problem here. I've a list box which list all the objects from a database. In addition, user can order the sequence of the object via the up and down arrow. The thing works fine for my javascript to order the sequence of the object list as wanted by the user. But how should integrate it with php that when the user click the button, then it'll get the value of the order sequence and insert it to the database. How it can get the whole index value from the list box and insert it into the database..??? I really wonder how to do that… Below is the code of how I generate the object to the list box and how to user can customize the order of the object sequence. <body bgcolor="#ffffff" text="#000000" id=all> <SCRIPT LANGUAGE="JavaScript"> <!-- … … //--> </SCRIPT> <? include "dbinfo.php3"; $query1 = "select * from sss order by order_id"; $result1 = mysql_query($query1) or die(mysql_error()); ?> <select name=abclist size=10 multiple width=180> <?php while ($array1 = mysql_fetch_array($result1)) { echo " <option value=$array1[sequence] > $array1[title] </option>"; } ?> </select> <br><a href="javascript:Up(window.document.abclist)"> <img src="up.gif" </a> <br><a href="javascript:down(window.document.abclist)"> <img src="down.gif" </a> </body>
Error Undefined Index
I keep getting the error: "Undefined index: page in ......." for this script: <? $page = $_Get["page"]; if (!$page){ $page = 1; } If the variable "page" isn't referenced in the url, I want it to be set to a default value of 1. This script works fine on one web server but not another. I'm assuming that it has to do with different php.ini files.
Undefined Index: Mode ...?
I was installing some "canned" php code and came across this error, and am not sure what it means. Undefined index: mode in line xx. here is the code snippet in case anyone can point me at something, or an ini setting. PHP Code:
Notice: Undefined Index:
I am getting the following errors: Notice: Undefined index: sender_name in c:program filesapache groupapachehtdocsallinone_form.php on line 12 Notice: Undefined index: sender_email in c:program filesapache groupapachehtdocsallinone_form.php on line 14.....
Renumber Array Index
Is it possible that I can renumber array indexes? The problem is that I am using array_unique, but it is returning something like this: [1]->value1,[3]->value2,[5]->value3 How can I reset the numbering, so the indexes are 1,2,3 (using a function would be preferable).
PHP Notice: Undefined Index
I got this error message below. How can i fix it... PHP Notice: Undefined index: REQUEST_URI in c:inetpubwwwrootguestbookguestbook.php on line 41 PHP Warning: Cannot add header information - headers already sent in c:inetpubwwwrootguestbookguestbook.php on line 41 any help is very much appreciated.
Sort Array Without Index
I'd like to sort a multidimensional array that hasn't numerical index, in fact it is like: Array ( [mobile] => Array ( [name_str] => mobile [relationCount_int] => 1 ) [video] => Array ( [name_str] => video [relationCount_int] => 2 ) [flash] => Array ( [name_str] => flash [relationCount_int] => 1 ) [tool] => Array ( [name_str] => tool [relationCount_int] => 1 ) ) And I'd like to sort, for instance for the value of "relationCount_int", so the new order should be something like: Array ( [video] => Array ( [name_str] => video [relationCount_int] => 2 ) [mobile] => Array ( [name_str] => mobile [relationCount_int] => 1 ) [flash] => Array ( [name_str] => flash [relationCount_int] => 1 ) [tool] => Array ( [name_str] => tool [relationCount_int] => 1 ) )
Array Index Question
I have source information in a file, and (part of) this information comes as coordinates. A coordinate consists of a letter followed by a number, ranging from a1 to i9 I'd like to count the number of occurrences of each coordinate, and put them in a matrix. The matrix should look like this (metasyntax): matrix = array ['a'..'i'][1..9] Later on in the script I'd like to be able to refer to a cell in the matrix by using the same letter/number combo. I know I can define an array using strings as keys, but how can I define a..i as keys without the need to specify them all individually?
Replace All Links With Url Index?
I'm writing a newsletter poster for a website. I have some html news items which I want to turn into plain text and prettify before emailing it. Now, i have found wordwrap and strip_tags so the only problem remaining is the links. Below you see what I like to see, but I haven't got a clue how to get there. $html = '<p>My <a href="http://go.there/stuff">link somewhere</a>.</p>' doSomeMagic($html); echo $html; After doSomeMagic I'd like the echo to look like this: My link somewhere[1]. [1] http://go.there/stuff That is, in the text I want an reference, and below the entire paragraph i want a link index.
Adding An Index To A Table
I am trying to convert a column to a unique column. Tried to look at some examples on-line but failed to find the correct syntax I need. So, while I'm waiting for my SQL book to arrive, a pointer would be nice. This is what I have so far.... ALTER TABLE member MODIFY username UNIQUE What am I missing?
Undefined Index Notices
I'm getting this: [client 192.168.5.50] PHP Notice: Undefined index: D1 in /var/www/html..... From this line of code: $id_option = $_POST['D1']; Which is posted by this: <form target="_blank" method="POST" action="mailchart.php" name="mail_data"> <input type="hidden" name="D1" value="<? echo $id_option; ?>"> <input type="submit" value="View Chart"></p> </form> My question is why? I *am* getting the correct value for $_POST['D1'] and at this point in time am really quite confused because that notice is getting thrown. [root@... ~]# php -v PHP 4.3.11 (cgi) (built: Nov 8 2005 06:24:40) [root@... /]# uname -a Linux ... 2.6.12-2.3.legacy_FC3 #1 Sun Feb 19 10:47:10 EST 2006 i686 i686 i386 GNU/Linux
Quotes Around Array Index?
I have a question about quoting array indices. This is from Rasmus Lerdorf's Programming PHP: Quote: You don't have to quote single-word strings. For instance, $age['Fred'] is the same as $age[Fred]. However, it's considered good PHP style to always use quotes, because quoteless keys are indistinguishable from constants. When you use a constant as an unquoted index, PHP uses the value of the constant as the index: Code:
Undefined Index: Error
simple php website that displays a table from my mysql database. To prep for my MCSE I moved my home server to Windows 2003 Standard, I installed mysql and php 5 to run some of my databases and websites. Under Linux the site worked fine, under windows I keep getting Notice Undefined Index error on line 67 I have went back to the basics just pull the data then display and still get the same error. 60 $sql = "SELECT * from newschool ORDER BY State, CollNam"; 61 62 $result = mysql_query($sql, $dbcnx) or die(mysql_error()); 63 $number_of_rows = mysql_num_rows($result); 64 65 while ($newArray = mysql_fetch_array($result)) { 66 67 $id = $newArray['id']; 68 $testField = $newArray['testField']; 69 70 echo "The ID is $id and the text is $testField <br>";
Preview On Index (substr?)
I want to make the posts on my index: www.datafuse.net shorter so people view the posts in full on their correct URL. But what I want is the script to cut as soon as it reads out a <br> tag. Any ideas?
Random Index File
I'd like to know how to generate a random HTML file when someone loads my site. (not just an image).
Problems With The Auto-index.
I'm setting up a guestbook using PHP and MySQL. It's set up to read one entry at a time. I would like to be able to delete entries if needed. The problem is that the auto_increment of the id continues where it left off, even if some of the entries have been deleted..... The script that reads the entries relies on the id to find them in the correct order. So it creates 'blank' entries where the script tries to read id numbers that no longer exist. I suspect that the solution might be to change the read script so that instead of reading 'the entry with id# ___' it reads 'the ___ entry in the table'. I just dont know how to set this up.
Index On A Combination Of 2 Columns ?
on a Mysql table i have 2 columns: - banner views - banner clicks now i want an index on the MySQL table so that i can make an overview with the order set to bannerclicks/bannerviews so i need an index on (bannerclicks / bannerviews ) is there a way to do this in MySQL without the need of an extra column ?
Undefined Index From Name Search.
I am developing a Abstract Submission system for a small medical association. What they want it to do is be able to search an exsiting members database and fill out the information automagically from the search. The original database is in Access and I have successfully exported it into MySQL without any problems. When I do the search and all of the fields are in the database for the form that I want to have filled out it works perfectly. but... if one of the fields is empty. I get a error. "Warning: Undefined index: MiddleName ... on line x" for each of the fields that is empty. I know why this is doing it. But I don't know how to fix it. I was thinking of using if then statements and adding a space to the variable so that variable would not be empty but that would screw up my Error checking in the next step. Code:
Warning: Undefined Index: 2 In
wat does this error means? Warning: Undefined index: 2 in C:Inetpubwwwroot emplateadmin.php on line 453 if i manually install php,(setting manually), this error wil not appear. but if i use the .exe to install, (means i dont' have to do the settings), this error will appear.
2 Or More Tables With FULLTEXT Index
I've started to develop a search for my PHP site, and I'm using FULLTEXT index After all, I created the indexs in the required search fields "title" and "text": ALTER TABLE table1 ADD FULLTEXT(title, text); and with the following query: SELECT * FROM table1 WHERE MATCH(title, text) AGAINST ('$search_string'); returns me the results that I want, for the search in table1. Until now, everything works fine. I want to include on this search: table2 and table3, both tables have different structure, but they have the some common fields, title and text. Is there any way to put in the same query, the search for a string in 3 differents tables?
Undefinded Index Using $_POST ...
I'm just getting starting in php and MySQL and I've got my application working correctly on my local windows XP computer. Now, when I publish to my ISP it's not going so well, which is also a Windows server. I'm using form variables to control navigating to different pages when a page is reloaded. As I said no problem on my machine but on the ISP server I'm getting the following messages snd of course it's not working. Both systems are running php version 4.3.10. Notice: Undefined index: Home in d:htmlusers149999mydomaincomhtmlmyfolderMem ber_Page.php on line 11 Notice: Undefined index: Clear in d:htmlusers149999mydomaincomhtmlmyfolderMem ber_Page.php on line 14 Notice: Undefined index: Update in d:htmlusers149999mydomaincomhtmlmyfolderMem ber_Page.php on line 16 Notice: Undefined variable: button in d:htmlusers149999mydomaincomhtmlmyfolderMem ber_Page.php on line 24 Notice: Undefined index: do in d:htmlusers149999mydomaincomhtmlmyfolderMem ber_Page.php on line 187 if ($_POST['Home']) { $button = "Home"; } else if ($_POST['Clear']) { $button = "Clear"; } else if ($_POST['Update']) { $button = "Update"; } switch ($button) { case "Clear": if (isset($selectedRow)) unset ($selectedRow); $items = 1; $street2 = " "; $comments= " "; $OriginAirport="PDX"; $searchState = "Oregon"; $message_new = "New Item? Please complete following fields:"; include("BagDetail_form.inc"); break;
Explorer Trying To Open Index.php
I have installed Mercuryboard bulletin board software and it is running well except for the fact that every time I try to post a message on the board it tries to execute the index.php file on the local machine. So I get a message that either ask me for a file to use to open it with, or a message asking me to save the file. Does anyone know why a php would be trying to execute on the local machine instead of the server?
Phpdig Cleaning Index
Ive just taken over the hosting of a site which uses phpdig as a site search function, a program I have absolutely no knowledge of. Does anyone know how i can immediately clear the index of redundant data and also how i can set up cronjobs to do this regularly or where to change the frequency of these cronjobs which i believe are already in existence (just too infrequent)
Printing An Array Using An Index?
I have to print an ACH file from an array I will recieve. I recieve this array through a function then I have to print this array to a file called "ACH.txt". The ACH file is broken down like this. position 01-017 is 1st record to be printed position 018-30 is 2nd record to be printed position 31-44 is 3rd record to be printed etc. I was thinking psuedo code like this Code:
Undefined Index Problem????
i have a html form called connect.html where i enter my username and password. After i have done that i hit the submit button. If i am successful, a message sayingUser [ w1009048] successfully connected which is in my handler1.php . I then click on a link called table which redirects me to another page (table.php) and SHOULD display the customer id and name from my customer table(database). When i click on the table link i get the following statmetents: Code:
Array Index Problem
im building a shopping cart, and im having the following problem. the array in the bottom is the way i store customer's product and quantity. For example, refer to below, product 3's quantity is 2. $item['product1'] = 1; $item['product2'] = 4; $item['product3'] = 2; $item['product4'] = 1; the problem im having is, how am i suppose to display the product? is it any function to list out the array index? i tried print_r, it did list out, but, it isnt the thing i want... i want an output like the following so that i can use the product id to retrieve the product information from database... product1 : 1 product2 : 4 product3 : 2 product4 : 1
|