User Profile

Collapse

Profile Sidebar

Collapse
miraan
miraan
Last Activity: Dec 30 '09, 12:00 AM
Joined: Apr 2 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • miraan
    replied to google smtp with php
    in PHP
    The smtp server you use is configured on your server, for example, your Apache configuration file. I'm not sure if Google allow everyone to use their smtp server though. You might want to check.
    See more | Go to post

    Leave a comment:


  • Make long url search engine friendly by using fake folder in address bar

    Hi,
    I have searched on the internet but can't find a way to disguise a long ugly php url such as www.domain.com/companies.php?i d=543 into this:
    www.domain.com/companyname
    the folder "companynam e" shouldnt really exist. There should be some instructions in .htaccess or something like that (not sure) to show www.domain.com/companies.php?i d=543 instead but still keep www.domain.com/companyname in the address bar. I dont...
    See more | Go to post

  • miraan
    replied to session in php
    in PHP
    this is what u need to do.

    Code:
    <?php
    session_start(); //Make sure this is right at the top
    $_SESSION['example']="Example"; // Now you can use this variable, or if you have set it from before then you dont have to do this.
    $example=$_SESSION['example'];
    echo $example;
    ?>
    Ill be happy to help you if you need more help.
    See more | Go to post

    Leave a comment:


  • miraan
    replied to Regex to Extract an Email Address
    in PHP
    Sorry, heres some improved code:

    Code:
    <?php
    $string="<a href='mailto:admin@example.net'>admin@example.net</a>";
    if(ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $string, $regs)) {
      	$string=$regs[1];
    } else {
    echo "No matches!<br>";
    echo $string;
    }
    ?>
    See more | Go to post

    Leave a comment:


  • miraan
    replied to Regex to Extract an Email Address
    in PHP
    hmmm,
    can you give me the function for that. I am new to regex and i cant seem to use that expression with ereg_replace. Here is what i have tried to do:

    Code:
    <?php
    $string="<a href='mailto:admin@example.net'>admin@example.net</a>";
    $string=ereg_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$",$1,$string);
    echo $string;
    ?>
    ...
    See more | Go to post

    Leave a comment:


  • miraan
    replied to Photo Gallery Website
    in PHP
    This is because you are trying to access the files from your local computer. First you need to upload these three files to your domain which you said you had, make sure that the webserver that your domain is on supports php though otherwise it will not work. Most webservers have php installed so that is not really an issue. To upload some files just find your FTP details given to you by your webhosting company in a welcome email or in your control...
    See more | Go to post

    Leave a comment:


  • miraan
    started a topic Regex to Extract an Email Address
    in PHP

    Regex to Extract an Email Address

    Hi all,

    Please can someone help me! I have experimented on this for hours but I am new to regex! Here is my problem:

    I want to get the email address admin@example.n et out of this string and store it in $email.

    The string is:
    <a href='mailto:ad min@example.net '>admin@example .net</a>

    Please can someone give me code to get the email address out of this string and place it...
    See more | Go to post

  • miraan
    replied to Embedding images in email.
    in PHP
    Thanks for all your help!
    See more | Go to post

    Leave a comment:


  • miraan
    started a topic Embedding images in email.
    in PHP

    Embedding images in email.

    Hi,
    I have been searching for hours, but I cant find a decent tutorial on how to embed an image in an email. All I want is to put a header image at the top of the email I am sending out, please can anyone help me on this? All help is greatly appreciated.
    See more | Go to post

  • don't worry, i have sorted this out now.
    See more | Go to post

    Leave a comment:


  • miraan
    started a topic T_ENCAPSED_AND_WHITESPACE error in fwrite() function.
    in PHP

    T_ENCAPSED_AND_WHITESPACE error in fwrite() function.

    Hi, I am trying to create a script that creates other php scripts but I am getting a problem, when I create the file and use fwrite() to write to it, it returns an error saying: Parse error: syntax error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\set up2.php on line 32. Lines 28 - 62 of my script are:
    Code:
    touch("$folder_install/display_emails.php");
    if ($fp_display_emails=fopen("$folder_install/display_emails.php",
    ...
    See more | Go to post

  • miraan
    replied to Connect to MySQL database
    Hi, can you give me an example of this please. I do not want to use phpmyadmin because I want to get used to the console.
    See more | Go to post

    Leave a comment:


  • miraan
    started a topic Connect to MySQL database

    Connect to MySQL database

    This may seem REALLY obvious, but I am a beginner at MySQL and I have just created a new database in phpmyadmin. I have now opened up the mysql console in cmd, but how do I actually connect to the database. My server would just be localhost. I do not know the basic syntax to connect to a mysql database actually within the mysql cmd. The mysql cmd is the one where it looks like:

    mysql>

    Please help.
    See more | Go to post

  • miraan
    replied to String of 5 unique random letters
    in PHP
    Thanks alot, it worked!
    See more | Go to post

    Leave a comment:


  • miraan
    started a topic String of 5 unique random letters
    in PHP

    String of 5 unique random letters

    Hi,
    Right now I am working on creating a string of 5 random letters. I have already created the script, it does create a unique random letter but it repeats it 5 times. Here is what I have so far:

    Code:
    <?php
    srand();
    $random=chr(rand(ord("A"),ord("Z")));
    $string="";
    for ($i=1;$i<6;$i++) {
    	$string .= $random;
    }
    echo $string;
    ?>
    ...
    See more | Go to post

  • miraan
    started a topic Configure phpmyadmin, how to get server details!

    Configure phpmyadmin, how to get server details!

    Hi,

    I have just installed Apache, PHP5, and WinMySQLAdmin 1.4 on brand new Windows XP, I have configured everything properly (I followed instructions from a book, so I know everything is right), I have tested a php file on localhost and it works fine, but now, I want to install phpmyadmin on my computer so I can easily play with databases, etc. I have downloaded the ZIP file for the english installation off the official website and...
    See more | Go to post

  • miraan
    started a topic Retrieving cookies on a different webpage
    in PHP

    Retrieving cookies on a different webpage

    Hi,
    I set a php cookie on one page, is it possible to retrieve the same cookie on another webpage on my site or can i just retrieve the cookie from the page that i set the cookie on?
    See more | Go to post

  • Making a floating javascript pop up that you can move around.

    Does anybody know the code for making a pop up that is draggable. An example is the one on http://www.planetsms.c o.uk, when you go to the page it comes up with a small pop up with a form inside, does anyone know how to make a pop up like that. Please look at example before replying.
    See more | Go to post

  • miraan
    started a topic How to hide a javascript error

    How to hide a javascript error

    Hi, I am getting a javascript error but my page works perfectly fine and nothing is wrong, how do i hide the javascript error pop up window that appears when you visit the web page?
    See more | Go to post

  • Oops, sorry i forgot to upload the new xml file after i put the target="_blank" . It works fine!
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...