User Profile
Collapse
-
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. -
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... -
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; ?>
Leave a comment:
-
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; } ?>
Leave a comment:
-
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; ?>
Leave a comment:
-
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...Leave a comment:
-
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... -
-
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. -
-
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",
-
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.Leave a comment:
-
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. -
-
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; ?>
-
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... -
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? -
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. -
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? -
Oops, sorry i forgot to upload the new xml file after i put the target="_blank" . It works fine!Leave a comment:
No activity results to display
Show More
Leave a comment: