344 Posted Topics

Member Avatar for inni2626

Please keep in mind that this is just a [I]Notice[/I], not a fatal error. It's not actually stopping your program. Your script will continue running. If it's still not doing what you want, it means there's a logic error elsewhere in the script. All this Notice is doing is telling …

Member Avatar for magento12
0
247
Member Avatar for s0bigg

Not a lot of time to write a full response now, but: These links should have variables at the end. Then based on the variables, you alter your WHERE and ORDER BY statements. So if the link is say [icode]http://www.yourdomain.com/page.php?filter=store&value=apple[/icode] [code=PHP] <?php if( isset($_GET['filter']) ) { $possible_filters = array('list','of','possible','filters'); // …

Member Avatar for diafol
0
171
Member Avatar for learner guy

[QUOTE=learner guy;1728359]i want to assign content of one div to another div ..lets say div 1 to div 2 just like in twitter when you type something and press "Tweet" a div is created and has the content of textbox .. how can i implement in php[/QUOTE] It's as pritaeas …

Member Avatar for EvolutionFallen
0
75
Member Avatar for 21122012
Member Avatar for jabeen123

Hi jabeen123, First a couple of points on syntax: a) You are missing a closing [icode]}[/icode]. You open one on line 2 and one on line 7, but only close one on line 11. b) You need quotation marks around the word [B]course[/B] in [icode]$_GET[course][/icode]. You may want to change …

Member Avatar for EvolutionFallen
0
388
Member Avatar for champmanking

I agree with stoopkid. Since this is a [URL="http://en.wikipedia.org/wiki/Foreign_key"]foreign key[/URL] for a page ID, you should name it page_id. I would also recommend renaming the field called "comment" to "content" or "comment_content". Since your table is already called "comment", having a field with the same name might get confusing. Also, …

Member Avatar for EvolutionFallen
0
266
Member Avatar for jelly46

jelly46, can you show the HTML for the element with class [B]element-column-right-alpha-outer[/B], as well as the HTML and CSS for the element directly above/before it?

Member Avatar for EvolutionFallen
0
92
Member Avatar for daniel36

I've never tried it before, but can't this be done easily with JS? Use AJAX to submit the form once, then either use a callback function to submit again, or let the form continue processing and go to the action page? EDIT: To be fair though I suppose using PHP …

Member Avatar for EvolutionFallen
0
131
Member Avatar for -==Zero==-

Hi Zero, Try adding this on line 30 (based on the complete code you added above): [code=PHP] <?php echo ( isset($_SESSION['username']) ) ? "Username is: $_SESSION['username']" : "Username not found!"; ?> [/code] Then let us know what this snippet outputs.

Member Avatar for -==Zero==-
0
532
Member Avatar for jacksantho

Lacking your code to look at, I'd say refer to the bottom of [URL="http://apptools.com/phptools/forms/forms3.php"]this page[/URL]. The third-to-last block of blue text should give you your answer.

Member Avatar for EvolutionFallen
0
114
Member Avatar for Peter1

How about using a counter in your loop? [code=PHP] <?php $i=1; while($i < 6) { echo "<input type=\"radio\" name=\"radio$i\" id=\"radio$i\" />"; $i++; } ?> [/code]

Member Avatar for Peter1
0
213
Member Avatar for styleest

Building on smantscheff's response, you'd also have an informative subject line instead of a vague plea for assistance, so I would know if I can help before I click the link.

Member Avatar for EvolutionFallen
-1
154
Member Avatar for abdulwajidck

Out of curiosity, how do you plan to [QUOTE=abdulwajidck;1496228]customise the wordpress to maximum[/QUOTE] and [QUOTE=abdulwajidck;1496228]develop the site[/QUOTE] without programming knowledge? That's kind of the point, you need that knowledge to customize, or you need to pay someone who [i]has[/i] that knowledge to customize it for you.

Member Avatar for diafol
-1
139
Member Avatar for EvolutionFallen

Hi, I'm having trouble submitting a form using a link. I have a table that lists a bunch of data, and I want to allow users to edit the data directly in the table. The user can click the "EDIT" link, which makes jQuery replace the appropriate <td> html with …

Member Avatar for severman
0
721
Member Avatar for darkslide

Just out of curiosity, why do you need the id in the URL still? I'm not sure about the tilde. Apache seems to use it to indicate user directories.

Member Avatar for EvolutionFallen
0
226
Member Avatar for EvolutionFallen

Hello, I am writing a development area for my clients to view their sites as I work on them. However, I'd like to restrict the directory of a given project to only users who are associated with that project. I'm looking for a way to create a "wrapper" so to …

Member Avatar for pixelsoul
0
134
Member Avatar for EvolutionFallen

Hello, I'm trying to create a button that allows the user to d/l info from a DB into a CSV. The button works fine, the download window appears and asks if I want to save/open the csv file. But when the file opens, there is nothing in it, and I …

Member Avatar for EvolutionFallen
0
113
Member Avatar for bops

Are you sure there's no blank spaces before your opening <?php tag in either file? Even a single whitespace character (blank space, newline, tab) can throw this error.

Member Avatar for dennishall
0
304
Member Avatar for Syntax12

+1 almostbob. Also, thank you, james hank, for creating an account on this site solely for the purpose of 1) flaming a bunch of intelligent, knowledgeable folk kindly offering their excellent guidance, 2) providing misinformed, irrelevant advice, 3) reviving a thread that has been dead for a year and a …

Member Avatar for EvolutionFallen
0
154
Member Avatar for jasha

In jasha's code you need to replace [icode]'main.php'[/icode] with the name of the PHP file that you don't want directly accessed. Then put it at the top of your index.php. It [i]must[/i] go before any other output is sent.

Member Avatar for CEVGames
0
259
Member Avatar for Glass_Joe

Good review. I'm sad to say it but I have to agree with you on a lot of points. Except in regards to ODST -- I thoroughly enjoyed ODST's campaign. True, it was a change of pace since you weren't as well-protected as the MC, but that's not necessarily a …

Member Avatar for Tauseefkhan
0
523
Member Avatar for mbano

Posting the code would help us diagnose the problem. For starters, though, you may want to make sure you're destroying the session.

Member Avatar for EvolutionFallen
0
58
Member Avatar for ayooshkasmth

Yes, you would need to retrieve the ID from the table. To do this you can use [URL="http://us.php.net/manual/en/function.mysql-insert-id.php"][icode]mysql_insert_id()[/icode][/URL]. A couple of tips: [icode]session_start()[/icode] should be at the top of your script. If your table has 'id' set to AUTO_INCREMENT, you can re-write line 1 as [code=PHP] $query = "INSERT INTO …

Member Avatar for ayooshkasmth
0
160
Member Avatar for EvolutionFallen

Hi, I'm somewhat new to jQuery/JavaScript, so any help would be greatly appreciated. I have a few textboxes that need to be populated when a user clicks a hot spot on an image map. Each hot spot has an alt tag representing the ID number of the object I need …

Member Avatar for MooGeek
0
161
Member Avatar for EvolutionFallen

Ok I feel like this may be a dumb question, but I'm putting it out there anyway. It's been a while since I've worked with C++. What characters does C++ print for negative values of char? Positive values seem to follow ASCII, but ASCII is only 128 characters. So where …

Member Avatar for EvolutionFallen
0
110
Member Avatar for Awah Mohamed

My advice: Figure out what you want to do and look up a bunch of tutorials that do something like it, then put all the info together to accomplish your goal.

Member Avatar for Awah Mohamed
0
83
Member Avatar for TheVenerableZ
Member Avatar for andydeans

You could store the user's ID in the [icode]$_SESSION[/icode] variable and then check if the user's ID matches the ID in the URL, and if not, redirect: [code=PHP] // Whenever you set your $_SESSION info, set: $_SESSION['user_id'] = $user_id; // Then, on page_name.php: session_start(); if($_SESSION['user_id'] != $_GET['ID']) // If the …

Member Avatar for EvolutionFallen
0
105
Member Avatar for EvolutionFallen

Hi all, I'm starting a new job soon and I'm going to be using my laptop there for a while until they get me my own system. I've set up a new user account called "Work" on my machine, but I'm not very well-versed with configuring user settings. What I'd …

Member Avatar for Anshikas
0
145
Member Avatar for sara nabil
Member Avatar for sara nabil
0
359
Member Avatar for Tenaciousmug

Why do you have backticks around "admin", "Member", and "username"? I've never seen those used in a SQL statement, but maybe I'm just ignorant. In any case, try [code=PHP] $sql = "SELECT admin FROM Member WHERE username='{$_SESSION['username']}'"; [/code] and see if that works.

Member Avatar for Tenaciousmug
0
118
Member Avatar for JameB

[QUOTE=almostbob;1283986] php serverside javascript clientside nothing in php occurs after the page source is downloaded to the browser to change the page source after loading is done in javascript [/QUOTE] Well said, almostbob. Not to get off topic, but they should really sticky a thread about the difference between server-side …

Member Avatar for JameB
0
880
Member Avatar for EvolutionFallen

Hi, I'm trying to make a link that changes my web page into a printable format and back: [code=HTML]<a id="print" href="#" title="Print map">Printable version</a>[/code] The switch to printable format works fine: [code=JavaScript] $('#print').click(function() { $('img').attr('src', newsrc); $(this).html('Screen version'); $(this).attr('id', 'screen'); return false; }); [/code] But going back, it doesn't work …

Member Avatar for EvolutionFallen
0
96
Member Avatar for EvolutionFallen

I have a rather embarrassing problem. While debugging a web app, I suddenly found I was not retrieving items from the database. I went to the command line to log into MySQL and got back "Error 1040: Too many connections." This was when I realized I'd forgotten to include a …

Member Avatar for EvolutionFallen
0
161
Member Avatar for EvolutionFallen

Hey all, I'm having a problem with my WordPress contact form. It is a script I edited from a tutorial I found, and it should be working right. I have a jQuery script that is supposed to help validate it and process it without page refresh. The problem is that …

Member Avatar for EvolutionFallen
0
192
Member Avatar for scaiferw

Here's one way to do it: [code=PHP] <?php if($_POST) { // create short variable names $name = htmlentities(trim($_POST['name'])); $email = htmlentities(trim($_POST['email'])); // process form } else { // create short variable names // they should have the same names as the ones created above $name = NULL; $email = NULL; …

Member Avatar for silviud
0
161
Member Avatar for benhowdle89

If you're constantly refreshing data with jQuery, you'd probably need jQuery to change the row colors. I'm no jQuery expert, but you could probably use some of the advanced jQuery selectors to accomplish this. [URL="http://api.jquery.com/gt-selector/"]:gt()[/URL] in particular may come in handy. You should be able to use this to add …

Member Avatar for rajarajan2017
0
1K
Member Avatar for JOUATT

On line two you are referencing the [icode]$_REQUEST[/icode] superglobal instead of the [icode]$row[/icode] variable.

Member Avatar for EvolutionFallen
0
99
Member Avatar for ilyas_varol

A word on usage: You should use $_POST for submitting forms, and $_GET when you need to redirect someone to a site an provide specific variable-value pairs. For example, if you have an e-commerce site, and your page loads product information from a database based on product ID numbers, you …

Member Avatar for test2009test
0
157
Member Avatar for davbell87

If I'm understanding you correctly, you want the form to populate with data as soon as the user selects an item from the drop-down menu. There's two ways of doing this that I can think of, but either way requires JavaScript. Method 1: This method uses JS to go to …

Member Avatar for pausepoint
0
5K
Member Avatar for Xufyan

Because you have [icode]$num<=5[/icode]. It will run the loop again when [icode]$num = 5[/icode], so you get $num++, making [icode]$num[/icode] = 6. To cut off at 5, take the "=" out of the while condition.

Member Avatar for diafol
0
167
Member Avatar for knaresh

Most of the function keys are already reserved by the browser for other tasks. So if you assigned an action to, for example, the F5 key, you'll end up refreshing the browser window. It may be possible to stop the default behavior of the button -- I'm not sure. Regardless, …

Member Avatar for keval_hack
0
99
Member Avatar for QWaz

pssubash is right. One way is to include a hidden field and use that to get the value: [code=PHP] <input type="hidden" id="id_number" name="id_number" value="<?php echo $id; ?>" /> [/code] You would retrieve this with [icode]$_POST["id_number"][/icode], same as the other fields in your form. Alternatively, however, if you really want to …

Member Avatar for vaultdweller123
0
149
Member Avatar for Momoe

Did you draw a mock-up of your site first? This will help you figure out what you're trying to build. Once you have a mock-up built, I personally prefer to build my pages from the top down, although another alternative may be to build the overall frame of the page …

Member Avatar for justcrowd2010
0
162
Member Avatar for iwanttolearnc
Member Avatar for iwanttolearnc
0
161
Member Avatar for charvie

You can make the links for your separate pages of results look like this: [code=PHP] <a href="mysite.php?page=1">Page 1</a> <a href="mysite.php?page=2">Page 2</a> [/code] Then when the page loads, before the DB query executes: [code=PHP] $RESULT_LIMIT = 20; // make sure $_GET['page'] is an integer if(!strcmp(gettype($_GET['page']), 'integer') { $page = $_GET['page']; $result_start …

Member Avatar for EvolutionFallen
0
76
Member Avatar for mobo57

Change that last line to: [code=PHP]echo '<a href="'.$sample12.'">'.$sample12.'</a>[/code] See if that works.

Member Avatar for EvolutionFallen
0
77
Member Avatar for ayesha789

You need to use a function to extract the result array from the [icode]$result[/icode] resource. [I]If[/I] you are [B]only[/B] interested in the [B]first[/B] result you get from your query, you can just use this: [code=PHP]$row = mysql_fetch_array($result);[/code] EDIT: [icode]$row[/icode] will contain the first row of results returned by the database. …

Member Avatar for scaiferw
0
19K
Member Avatar for Darkwolf33984

Hi, You're missing a semi-colon and an assignment operator in your first line (Also, why is there an opening brace right after it?): [code=PHP] $include_path = '/usr/lib/php:/usr/local/lib/php:/home/findthem/php'; { [/code] Hope that helps. -EF

Member Avatar for EvolutionFallen
0
82
Member Avatar for muralibobby2015

The End.