User Profile
Collapse
-
i can access mysql through phpmyadmin using th same user/pass combo I used in the script. I don't quite understand what you are trying to say. -
-
mysql_query(), mysql_numrows(), foreach() and implode() problems
OK, this is the relevant portion script:
[PHP]<?php
$username = '__'; // MySQL Database Username.
$password = '__'; // MySQL Database Password.
$server = '__'; // MySQL Database server (most likely localhost).
$db = '__'; // MySQL Database Name.
$num = 4; // Number of Wordpress Articles to show.
$tz = '__'; // Your Timezone written using the list at http://php.net/timezones... -
No, but after fiddling around a bit I got it all to work the way I wanted it to, its posted below for anyone who whats to use it. GetWPData(); retrives data from wordpress tables and can be passed a table name and limit how many varibles or strings. RearrangeDateTi me(); rearranges a array of specified date and times to another specified way.
[PHP]function GetWPData ($tablename, $limit) {
$sql = "SELECT `post_date`, `post_title`...Leave a comment:
-
opps.
[PHP]output $test [/PHP]
is ment to be
[PHP]output $text[/PHP]Leave a comment:
-
Get MySQL function clean-up and support required
OK,
Well I've got this script and I'd like to implement this function into it where a function retrieves a specified amount of data from a specific mysql database, rearranges a part of it, and outputs the result to another specified varible. this is what i've got so far (please ignore the long-winded variables, they are just for explanations):
[PHP]function RearrangeDate ($input-data/time, $the-way-it-should-be-arranged-e.g.-D/m/y-(not... -
how will they see the millions of problems with the script then?Leave a comment:
-
Error with the loop
have a look for yourself, <REMOVED> (feel free to send emails)
dont enter in the visual code (or enter it incorrectly) (or correctly) and see how all hell breaks loose (the loops of death!) where it should just pop-up with (one) an error message.
Code (mail.php)
[PHP]<?php
$subject = $_POST['subject'];
$message = $_POST['message'];
include 'config.inc.php ';
function alert_redirect( $alert)...Last edited by ak1dnar; Sep 4 '07, 01:27 PM. Reason: Personal web site links, Not Allowed in the technical forums -
thanks a bunch,
anyone still know how i could improve my script's code to make it more efficient?
Revised Code (mail.php):
[PHP]<?php
session_start() ;
$subject = $_POST['subject'];
$message = $_POST['message'];
include 'config.inc.php ';
$java_ar1 = '
<script language="Javas cript">
<!--
alert ("';
$java_ar2 = '")...Leave a comment:
-
Using sessions in a mailing script to prevent flooding of mail.
Ok, I still need help with these session varibles that I started to ask about in my previous post (http://www.thescripts.com/forum/show....php?p=2790429)
I need that one little thing (surrounded by ***!!!!! in the quote above) changed so that it checks to see if the time is between 0 and 500 seconds ago, not just 500.
Can anyone help me?
P.S. Here is my revised PHP script code:
... -
-
Yep
I was going to add a part that deletes the IP Address/Time once it expires
How would I do that?...Leave a comment:
-
atyndall started a topic Limiting access by reading server logs and matching against client IP address.in PHPLimiting access by reading server logs and matching against client IP address.
Basically,
I have a email script which (on the sending of the email) writes into a file handle called $fcf (on a new line) with the senders ip address ($ipaddress) and the time on which they sent their email ($time) in this format: $ipaddress--$time on a new line in $fcf.
I am new to php and if someone could convert my normal language into PHP scripting I would be very grateful.
Code:if ($fcf contains $_SERVER['REMOTE_ADDR']
No activity results to display
Show More
Leave a comment: