|
Thanks for the FYI, I'll account for it now before I forget about it.
|
|
|
|
|
I figured out my problem... as usual forgot the most simple aspect of programming $_SESSION['myusername'] = $myusername;
I really does help to actually assign a value to something... Hopefully this will help someone else that finds them self in the same lack of sleep state.
|
|
|
|
|
Even though you seem to have found a solution, I have actually found some web hosting to be quite a pain if you are using Sessions. Depends on the provider though. With my current provider it was becoming way to complicated to set up properly so I used another method
|
|
|
|
|
This is just for a small intranet site. I think the most users I've ever had on at one time is 5
However I'm always looking for ideas.
|
|
|
|
|
Good luck with intranet site hope you don't find too many more issues.
On my website in the end I reverted to cookies. When the user logs in it stores the information they typed in the form in 2 cookies (nom). Then every time any page loads I check it against the database, thus maintaining some form of security
|
|
|
|
|
I was having a heck of a time with cookies in a terminal services environment. Not really sure why that made a difference, but maybe I'll look back into that again in the future.
|
|
|
|
|
Hello all,
In a piece of PHP code, I'm trying to set two styles at the same time for a set of dynamically created divs...
The code I'm trying to use is:
echo('<div id="'.$DivId.'" style=width:'.$width.'; display:none>;');
As you can see $DivId is a variable that depends on a loop.
I need to set the width (another parameter).
And at the beginning that DIV must be not shown hence the display:none.
If I try to modify the style one at a time it works well... I mean that if I try to change the width only or the display only it works well... but I don't know how to chain the two changes.
Any advice?
Thank you in advance!
PS: I've tried to Google for "php more than one style", "php change styles", "php style guide"... no luck here...
|
|
|
|
|
I tried the solution in the third link and all the solutions that Graham is proposing and none of them worked...
Somehow a problem must be there that doesn't allow it to work... it is like the display:none modifier that I'm adding would avoid anything else to work...
Thank you for trying!
|
|
|
|
|
I've found the problem...
It happens that the TinyMCE editor window that I'm using in that place doesn't override the style when using display:none in the div that it is contained...
AMAZING.
Well, I've found that this has happened to lots of people and a trick to cheat that...
It is a PITA when you put efforts and time to solve things that should be working ok...
Many thanks for helping me.
|
|
|
|
|
It looks like you're not quoting the style, so the attribute is being broken on the space in the middle - try this:
echo('<div id="'.$DivId.'" style="width:'.$width.'; display:none>;"');
or this:
echo('<div id="'.$DivId.'" style=width:'.$width.';display:none>;');
|
|
|
|
|
Using the first option (quoted) the width is applied but the display:none is not.
Using the second of those options (no space) the width is not being modified and only display:none works.
PS: it is like if the display:none would destroy all the other options out there...
Thank you for trying...
|
|
|
|
|
That sounds very odd... What is the value of $width ?
|
|
|
|
|
I've used 1000 and "100%" without luck... with both numbers removing the display:none it works like charm...
|
|
|
|
|
CSS values should really have specified units, though the browser will assume pixels if you leave it off - make sure that the generated source looks something like this:
<div id="div0001" style="width:1000px; display:none"> ...content... </div>
or for percentage:
<div id="div0001" style="width:100%; display:none"> ...content... </div>
If this fails to work, then I suspect the problem is somewhere else in the CSS and the DIV is picking up rules from the stylesheet.
|
|
|
|
|
No luck... the syntax is exactly the one you are specifying here... and it does not work... I've put strange id's like "grahambreachishelpingme" (and I'm sure that I don't have any id like this one in any CSS file out there)...
Any other idea?
Anyway thank you again for trying...
|
|
|
|
|
Without being able to see the full page, I'm a bit short of ideas.
If I could see the page, I would inspect the DIV using FireBug in Firefox, or Chrome's developer tools. That way you can see which styles are being applied to it and where they are coming from.
|
|
|
|
|
I've found the problem...
It happens that the TinyMCE editor window that I'm using in that place doesn't override the style when using display:none in the div that it is contained...
AMAZING.
Well, I've found that this has happened to lots of people and a trick to cheat that...
It is a PITA when you put efforts and time to solve things that should be working ok...
Many thanks for helping me.
|
|
|
|
|
I'm trying to implement a simple tracking ID in my Wordpress theme. It would work like this, I put links out on the internet including a get parameter as follows:
http://www.mywebsite.com?track_id=myid
When visitor travels to my site through the link it latches the track_id as they click through the site and doesn't release the id until they leave.
At any given point in the visitor's session I want to look up which affiliate referred them to my site so if the visitor buys anything I can track my sales and which traffic sources and or affiliates are working out the best.
It seems pretty simple but I cannot figure out how to latch the tracking ID to a visitors session on the site.... Anybody know???
Thanks!!!!
|
|
|
|
|
Would simply using PHP's built-in session handling be sufficient for your purposes?
see, e.g., http://www.tizag.com/phpT/phpsessions.php[^]
If not, let me know exactly why not and maybe we can come up with an alternative idea.
--Greg
|
|
|
|
|
You could use a session cookie then retrieve the value from $_COOKIE as they move thru the site.
|
|
|
|
|
Whenever i try to integrate Php with Apache using genuine pattern of copying php.ini-development file
changing path i encounter a problem ie when i restart my apache server it pops a error message and does not start again .Please someone help me with this problem.
|
|
|
|
|
I shoul you to use XAMPP ... it's very usefull for your purpose !
Check it here
www.malorgio.it
|
|
|
|
|
Hi,
I m totally new for PHP.
I downloaded one data grid example from sigmawidgets.com mostly pages are running well but some pages have PHP code which is not running, because I have not installed the PHP on that server.
I have Apache Tomcat (5.28...) web server on 64bit Windows 2000 server.
Can some help me how to install PHP and how it works.
Thanks in advance.
|
|
|
|
|
You may wish to try XAMPP.
It's available in an installer package that will setup the whole suite - php, mysql, apache etc.
It comes with a number of examples of php code.
|
|
|
|
|
You can also check the EasyPHP suite which is more or less the same than XAMPP.
Good luck
|
|
|
|