|
Your problem is in the Query you are using to update the record:
UPDATE s_lessons SET point=%s WHERE tid=%s, lid=%s, sid=%s, term=%s
Is not valid Sql, and should be something like
UPDATE s_lessons SET point=%s WHERE tid=%s and lid=%s and sid=%s and term=%s
You might wanna read up a bit on the SQL update syntax[^]
|
|
|
|
|
what a silly mistake!
you are right.i changed it and the problem solved!
thank you very much.
|
|
|
|
|
Does anyone know if samba has certain supported/preferred file systems? ...or does it not matter?
I'll be accessing the share with:
- Ubuntu Lucid
- Windows XP, Vista, 7
|
|
|
|
|
Went with ext4, doesn't seem to really matter since samba doesn't really allow for direct access... Windows machines seem to be ok with it...
|
|
|
|
|
Samba operates through the VFS (virtual file system), so anything you can use in Linux, Samba will be able to use and share it.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
What I'm trying to do should be simple but for some reason it's not. All I want right now is to display one of my session variables on the page (this way I know it's what I think it is).
I have <td><input name="myusername" type="text" id="myusername" style="width:150px"></td> on the first form to get the value and then session_register("myusername"); on the next page to assign the value to the session variable.
I then have (this is the very top of the page (page 3))
<?php
session_start();
if (!session_is_registered(myusername)) {
header("location:login.php");
}
?>
Test
<?php
$test = $_SESSION["myusername"];
echo $test;
?>
On the "last" page... the page isn't redirecting so I know the value is "good" but for some reason I can't get it to display. It's just displaying 'Test'...
|
|
|
|
|
5.1.6
However stupid here realized that he forgot to actually assign the session variable a value. I guess the important thing is I figured it out
|
|
|
|
|
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!!!!
|
|
|
|