User Profile
Collapse
-
If script1.php is waiting on script2.php, have script2.php call script1.php after it's done executing. -
Perhaps this poorly written but useful guide will help you.
Apache can't send email by default; it needs to be configured. That's why you're getting your error message.Leave a comment:
-
Replace the apostrophe and spaces with URL encoded symbols:
Code:"image/angels/Alena%27s+Angels+Flyer_t.jpg"
Leave a comment:
-
Add a subdomain. Copy current contents into the subdomain's folder. Upload new contents into the root folder.Leave a comment:
-
-
Code:RewriteCond %{HTTP_HOST} ^(.+)\.example\.net [NC]
This new regex just selects everything before the string ".example.n et"Leave a comment:
-
Get rid of the if() statement, and just leave the code that's inside it. setcookie() is the only way to permanently delete session data, and your condition may not be getting evaluated as true.
Then, let us know if it worked or not.Leave a comment:
-
-
What exactly are you trying to accomplish? Are you sending an activation code after they fill out a registration form? What I would do is this:
- Generate a random number for each user and store it in a database.
- Send them a hash of this random number in your email (retrieve it from the database, then sha1() or md5() it).
- When they click on the link/enter the activation code, retrieve the number from the database, hash it, and compare
Leave a comment:
-
From w3schools:
Code:$result = mysql_query("[INDENT]UPDATE table_name[/INDENT][INDENT]SET column1=value, column2=value2,...[/INDENT][INDENT]WHERE some_column=some_value[/INDENT] ");
Leave a comment:
-
Code:<?php if(isset($_POST['checkboxname'])) {[INDENT]$_SESSION['checkboxvalues'] = json_encode($_POST['checkboxname');[/INDENT] } else if(isset($_SESSION['checkboxvalues'])) {[INDENT]$checkboxValues = json_decode($_SESSION['checkboxvalues']);[/INDENT][INDENT]foreach($checkboxValues as $value) {[/INDENT][INDENT][INDENT]//iterate through, echoing checkboxes and setting checked to "checked" based on whether the array is checked[/INDENT][/INDENT][INDENT]}[/INDENT] } else {[INDENT]//display fresh ch[/]
Leave a comment:
-
Well, another potential problem would be that you don't have an opening quote before your <img> tag:
Code:echo "<td>" . <img src=\"members.php?file={$row["photo"]}\">" . "</td>";
Should read:
Code:echo "<td>" . "<img src=\"members.php?file={$row["photo"]}\">" . "</td>";
Leave a comment:
-
You could use an <iframe>, and load a specific page into it using Javascript.
You can't, however, simply change the contents of the browser address bar. It will always show the address of the page it's displaying.Leave a comment:
-
Put some code tags around this so that it's easier to debug. What exactly is the problem?Leave a comment:
-
Printing an External PDF File
Hey all,
I have a project that I'm working on where I need to print a PDF file on the fly. I was wondering if there was a way to print an external file when the user clicks on a link? I've tried loading the file into an IFRAME, using pop-ups and closing them, and several other methods.
What the goal actually is that a PHP script I wrote will merge 4-5 PDFs on the fly, and then disguise itself as a PDF file. I want the... -
Manipulating MP3s with PHP?
I just need to know where to start with something. I'd like to write a script that can split an MP3 file into multiple MP3 files using timestamps (e.g. start at 00:30 and end at 01:00). Is there any script that does this already? If not, how do I write one? -
White lines around everything in Photoshop
Hi guys, I simply want to write some text, possibly give it a drop shadow, and export it as PNG. Apparently, photoshop won't let me do this without making a huge fuss over it and not truly making my background transparent. Anything where something is anti-aliased or has a drop shadow is left with a white background. I found the "matte" option in the save for web and devices menu, but if I select "none" it gets cut-off.
... -
helimeef replied to Regex problem: finding part of string that *doesnt necessarily* have to be therein PHPIt's simple, to make something optional, wrap it in parentheses and add a "?" at the end of it.
For example, let's say you wanted to search for "something is fantastic" but you want "is" to be optional:
Code:/\bsomething( is)? fantastic\b/
Leave a comment:
-
I compiled MySQL under root (by using "su -" and then typing in my password), and when I run /usr/local/mysql/bin/mysql I get "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)", and running /usr/local/mysql/bin/mysqld_safe I get the same crap I got in my last post.
I wish I know what I did 2 days ago when I got it to work... Something on drupal.com that told me how to "configure...Leave a comment:
-
Well I typed in:
Code:/usr/local/mysql/bin/mysqld_safe
Code:touch: /usr/local/mysql/data/new-host.home.err: Permission denied chown: /usr/local/mysql/data/new-host.home.err: Permission denied Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/bin/mysqld_safe: line 380: /usr/local/mysql/data/new-host.home.err: Permission denied rm: /usr/local/mysql/data/new-host.home.pid:
Leave a comment:
No activity results to display
Show More
Leave a comment: