I'm not 100% sure of what your question is, but I'll take a stab at it.
You would actually want to use Javascript for something like this. I'd recommend using the jQuery library.
jQuery has a function called toggle() which would do what you want.
Check out a site I did a while back that uses this functionality:
http://www.orgaproltd.com/products.php
If you click on one of the products,...
User Profile
Collapse
-
A shot in the dark, but did you remember to set which database to use in your 'connect.php' file?
If you have more than one database running on your hosted server it could be confused.
If you didn't, try adding:
Code:mysql_select_db('YourDB');
Leave a comment:
-
I see that you have "<OPTION VALUE=ALL>All", but you never close that option. Try:
<option value='All'>All </option>
Also, for standards'-sake, don't use uppercase letters in elements and element attributes.
<OPTION></OPTION> will still work, but it's best practice to do it properly, all lower-case: <option></option>.Leave a comment:
-
What are you trying to accomplish with this script? A webpage doesn't see it as "user 1 came, and then user 2 came", it sees it as "user came". If 50 people go to a webpage, the webpage will not know that 50 people are there, it treats each one as unique.Leave a comment:
-
What are you trying to use this XML for? Are you trying to take information from a user and store it in a new XML page, or do you simply need PHP to render as an XML file on the fly?
If you want PHP to render information as XML at run time, you can do something like:
Code:<?php header('Content-type: application/xml'); print "<root>"; print "\t <parent>"; print
Leave a comment:
-
Bottom right of all my replies you should see "Choose as Best Answer".
Thanks.Leave a comment:
-
Perfect.
If one of my answers solved your problem, please set it as the Answer for this thread. This will allow other users that have the same issue as you to see what the fix was.
Thanks.Leave a comment:
-
Another note, when you do "session_start( );" on your proceeding pages, it does NOT overwrite the existing session, it EXTENDS the session on to the new page.Leave a comment:
-
Session variables are domain based, not directory based. If you set "$_SESSION['auth']" to '1' on the login page, and include that session on your proceeding pages, $_SESSION['auth'] will still be set.
Check this out:
www.autumnsolutions.org/storage/sessions
On the first page I made the $_SESSION['auth'] variable be set to "Wooo!" or something like that. When you click 'Go' underneath that,...Leave a comment:
-
To expand on Johny's comment, some servers (Mainly apache) will initiate a PHP code block when <? ?> is used, however, Windows-based servers require <?php ?> tags.Leave a comment:
-
AutumnsDecay replied to Updating record's quantity in mysql table if exist otherwise insert a new row.in PHPI don't know why you're using the (int) on line 1, but let's remove it for for now. Also, you have a period '.' in your SQL query on line 2.
Here's what SHOULD work for you:
Code:$productId = $_POST['txtItemID']; $nwQty = "SELECT Quantity FROM stock WHERE itemCode = '$productId'"; // check if the product is already $solution = mysql_query($nwQty); if (mysql_num_rows($solution) ==
Leave a comment:
-
Set a session variable, and check to see if that session variable exists on each page.
Login Script:
Code:session_start(); // Start the session //All your user data verification for login $_SESSION['auth'] = 1; //Create a SESSION variable called 'auth'. header("Location: yourpage.php"); //Redirects to yourpage.php after the script has run.
Leave a comment:
-
First off, don't use the dollar sign ($) in the $_POST array.
Code:$var = $_POST['variable']; // GOOD $var = $_POST['$variable']; // BAD
Code:<select name="myDropDown"> <option value="1">1</option> <option value="2">2</option>
Leave a comment:
-
I'm not exactly what you're after as your question is pretty vague, but it sounds like you're looking for a login script of sorts.
A simple login form would look something like this:
Code:<?php session_start(); if((!$_SESSION['auth']) || ($_SESSION['auth'] != 1)){ ?> <form action="login.php" method="post"> Username: <input name="username"
Leave a comment:
-
Giving the <html> tag any properties makes it act as an element, and elements have width / height properties.
What I don't understand is this: Why set the background color for your HTML tag, when your body tag is 100% width/height and a different color?
Delete " html { background: yellow; } " from your CSS and the space between your html and body on the page will disappear.Leave a comment:
-
AutumnsDecay replied to Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\job_detail.php on linin PHPThanks for that, Omer.
Been a while since I've used PHP. Been enjoying Java & C++ for long enough to lose any potential knowledge, haha.Leave a comment:
-
I don't see where "$chairman" is being set on the "save.php" page.
Judging by your code, you'd want to put something like this on save.php BEFORE your MySQL query:
Code:$chairman = $_POST['select1'];
Leave a comment:
-
AutumnsDecay replied to Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\job_detail.php on linin PHPI believe the issue is that you're using "mysql_fetch_ar ray". I could be wrong, but it's worth a shot.
Try using "mysql_fetch_as soc($result)". I see that you're using name keys ($row['username'], etc), which I believe is what an associative array (mysql_fetch_as soc) would return, whereas a standard 'fetch_array' returns a numerical key array.
Give it a shot and let me know.Leave a comment:
-
As Rabbit said, you will need to find a website hosting service. From there, you will typically use an FTP (File Transfer Protocol) application to connect to your "space" on the server and upload your files.
If you have an issues with this, please let us know.Leave a comment:
-
I'd change hosts, personally, especially if you're using their free package of hosting.
You can find basic PHP enabled hosting plans for like, $1/moLeave a comment:
No activity results to display
Show More
Leave a comment: