Search:

Type: Posts; User: smithster; Keyword(s):

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    3,412

    Adding Line breaks to a textarea box

    I have tried preg_replace and str_replace but both show \n and \r within the textbox. I want to pull some data out of the database and display it in the textarea to allow for easy update.

    The...
  2. I have sort of got it working....... The...

    I have sort of got it working....... The javascript seems to be very erratic though. Sometimes it just won't bother executing it's commands!! For example, I've asked it to reload the page after it...
  3. Javascript working but erratic and messy... :/

    I have 3 forms all with a hidden input used to choose between 3 different actions.

    Here's my javascript code...


    if (document.myForm.action.value == 'add_category')
    {
    var...
  4. Changing content using css but no javascript

    My boss has asked me to design a script that allows the end user to switch between texts but I can't use javascript.

    I have 2 links....

    1st Link...
  5. Replies
    7
    Views
    3,220

    lol thanks for that Tim. Much appreciated. ...

    lol thanks for that Tim. Much appreciated.

    The time to not use functions, would that be while I have no clue how to properly use them!!!

    I was advised to learn to use them because I tend to...
  6. Replies
    7
    Views
    3,220

    Well I'd never read through that part of the php...

    Well I'd never read through that part of the php manual before, but I did read up on function scopes yesterday at php.net and it talked about using globals which does get this working. But as I...
  7. Replies
    7
    Views
    3,220

    Functions and Variables

    I've been reading through about passing variables to functions and I can only find references to using globals but I heard that was a bad idea.

    Here's an example script...


    function...
  8. Replies
    1
    Views
    13,288

    Login Script Using Cookies

    I've got here a very basic login script which is supposed to create a cookie. I'm having a few problems with it though. Here's what I've got...

    Login.php


    <?php
    ...
  9. Replies
    1
    Views
    1,324

    Viewing User Profiles

    Ok, a little hard to explain...

    This is usually found in a forum or a cms. Users have an id number 1,2,3... and forum threads also have an id number. I'm hoping to expand my PHP knowledge a...
  10. Replies
    1
    Views
    1,985

    MySQL Fields In A Drop Down Option Form

    Lets say I have the following table in mysql....

    Field Name - |db1|db2|db3|db4|db5|
    Data - |db1|db2|db3|db4|db5|

    Lets say I want to put all those data entries into a drop down list...


    ...
  11. Thank you!!! This has been bugging me for a very...

    Thank you!!! This has been bugging me for a very long time!!! Finally it is now working properly.

    Thank you to Jas and to thetestingsite for all your help on this.

    Smithster.
  12. Here is what I have tried... $content .=...

    Here is what I have tried...


    $content .= ''.preg_replace('/[\r\n]/','',$names[$i]).':'.crypt(preg_replace('/[\r\n]/','',$passwords[$i]),base64_encode).'\n';



    $content .=...
  13. Thanks Master_script_maker, but unfortunately it...

    Thanks Master_script_maker, but unfortunately it does almost the same thing except it does this....



    username:password/nusername:password/n
  14. Replies
    10
    Views
    4,049

    Ah I see. I just uploaded the script to my...

    Ah I see. I just uploaded the script to my online server which hosts 4.44 and it doesn't actually work there neither. But it does on my home server which hosts 5.22!!

    So, either someone else...
  15. Replies
    10
    Views
    4,049

    It is probably too old. Are you running a local...

    It is probably too old. Are you running a local server? As in a web server from home?

    Why don't you try upgrading your version of PHP at least?

    The script you posted, even with the <? tag as...
  16. Replies
    10
    Views
    4,049

    I think it depends on the PHP version. This...

    I think it depends on the PHP version. This script works on my version which is 5.22

    Just a tip, not all versions of PHP are happy for scripts to start <?

    Think you should try replacing it...
  17. Sorry for the long reply again Jas, had to put...

    Sorry for the long reply again Jas, had to put this on hold for a few days as work has asked of me all the hours God sends!!! Finally finished for the weekend!! So back to this.....

    Have never...
  18. Thread: Message Box

    by smithster
    Replies
    7
    Views
    2,286

    It works, you might want to have a look at...

    It works, you might want to have a look at tidying it up a little though. I'm just off to work so only had 10 mins to put this together. It does work though as I've tested it.



    <?php...
  19. Thread: Message Box

    by smithster
    Replies
    7
    Views
    2,286

    Although I agree with Twey, MySQL is a much safer...

    Although I agree with Twey, MySQL is a much safer and a better way to go, but here is a script I've put together for you.


    <?php

    if(isset($_POST['submit'])){

    $path =...
  20. Thread: Message Box

    by smithster
    Replies
    7
    Views
    2,286

    mysql_connect(localhost,username,password);...

    mysql_connect(localhost,username,password);
    mysql_select_db(dbname);

    if (isset($_POST['submit'])){

    $text = mysql_real_escape_string($_POST['textdoc]);

    $query = ("UPDATE table set something...
  21. Nice one, really wish they taught it at my...

    Nice one, really wish they taught it at my school. But they didn't. Left college not knowing anything about html let alone PHP. Have had to learn it all by myself really. And with the help of...
  22. Nice one Jas, really does work well now :) ...

    Nice one Jas, really does work well now :)

    Thanks again.
  23. Sorry for long reply. Been at work all day. ...

    Sorry for long reply. Been at work all day. Thanks for building this up for me. Works very well. Except for 1 thing!! If a user only puts in 1 username and password, the output is only the first...
  24. lol, hey, people can say what they want!! I been...

    lol, hey, people can say what they want!! I been doing this for around a year now. Still a noob I know!! But I'm learning, and enjoying what I'm getting out of it. But this is why I don't post...
  25. lol, well the 3rd edit killed it!! Outputs all...

    lol, well the 3rd edit killed it!! Outputs all on 1 line again now!! Also, no passwords output at all!!!

    Didn't realise you wern't able to test this out. No worries if you want to look at it...
Results 1 to 25 of 94
Page 1 of 4 1 2 3 4