Squidge 101 Newbie Poster

Shouldn't line 99 => $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';

be wrapped in double quotes not single?

$email_exp = "/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/";

Squidge 101 Newbie Poster

@Deepak,

Once you have confirmed re write is enabled, you also need to set your base:

RewriteBase / = these makes "/" the return for where all rewrites will start from. Looking at what you have posted this is a key item that is missing.

Also for the rule itself:

RewriteEngine On
RewriteRule ^([^/]*)$ /index.php?rt=$1 [L]

I hope that helps

Squidge 101 Newbie Poster

more information is needed.

EasyPHP from what i remember uses "127.0.0.1" not "localhost"

Squidge 101 Newbie Poster

No ducati????????;-)

Squidge 101 Newbie Poster

Why use js to do math. PHP can easily do that for you. Just add a function into your loop

Squidge 101 Newbie Poster

@broj1

:)

Although you did give a clear explaination :)

Squidge 101 Newbie Poster

Change your function

function display(){
        return $this->teamName;
    }
Squidge 101 Newbie Poster

Try VB

Squidge 101 Newbie Poster

can you advise this part of code:
Notice: Undefined index: ItemID in /u/students/j/j.d.dancks/public_html/onestopshop/newsearchresults.php on line 234

Squidge 101 Newbie Poster

have you tried dumping the information to make sure your variable is being populated?

var_dump($match);

Squidge 101 Newbie Poster

evening.

Line 16 and Line 17 you are using variables but no info to them.

Look here on how to use func_num_args()

http://php.net/manual/en/function.func-num-args.php

Looking at the code, have you tried breaking this down to single functions and testing them individualy?

Squidge 101 Newbie Poster
Squidge 101 Newbie Poster

Read what is written!!!!
You need to configure ur test server are u using xampp?
Macromedia (dreamweaver) doesnt have the ability!!

Squidge 101 Newbie Poster

Macromedia has no email ability.

Your test server (XAMP etc) will have this function. You will need to configure it

Squidge 101 Newbie Poster

have you tried setting max-height?

Squidge 101 Newbie Poster

which one?

Each one.

lets take this on for example:

function check($arr,$name)
{
$found = false;
$c=0;
while(isset($arr[$c])&&!$found)
{
$found = $arr[$c]['item_name'] == $name;
$c++;
}
echo "Check: ".$found.", search for: ".$name.", Count: ".$c;
return $found;
}

the while loop is executing and will echo only once, when the while loop has finished and will use the last result.

function check($arr,$name)
{
    $found = false;
    $c=0;
    while(isset($arr[$c])&&!$found)
        {
        $found = $arr[$c]['item_name'] == $name;
        echo "Check: ".$found.", search for: ".$name.", Count: ".$c;
        $c++;
        }
    return $found;
}

Now it will echo during the loop as it executes. This is common logic.

Look here for explaination:

http://php.net/manual/en/control-structures.while.php

Zagga commented: Nicely explained +4
Squidge 101 Newbie Poster

you need to echo inside your while loop

Squidge 101 Newbie Poster

Can you show your form?

Also have tried var_dump($_POST); to see if the varible is being populated?

Squidge 101 Newbie Poster

in your .htaccess you need to have
RewriteBase

In mine i have this set as

RewriteBase /

So you will then rewrte your includes to:

<?php
include('/styles/header.php');
include ('/styles/leftblock.php');
include ('/styles/mrnuleft.php');
?>

Try this:

http://www.generateit.net/mod-rewrite/

Squidge 101 Newbie Poster

@LastMitch
Many thanks I will have a look over those links and come back :)

Squidge 101 Newbie Poster

Evening All,

I am looking to start a class that dynamically creates a sitemap.xml on command and if possible auto uploads to google.

The only thing is all the scripts i have come across by searching google tend to be using static pages.

My links are dynamic and are also modified with mod_rewrite.

I am stuck at where to start.

Could anyone point me in the right direction to start?

Thanks for reading

Squidge 101 Newbie Poster

http://localhost/install/index.php

Are you sure you didnt create a sub folder for the install?

http://localhost/[some folder]/install/index.php

Squidge 101 Newbie Poster

looks to be a good way of doing it.

Scanning the documentation it seems this is a popular request for v2

Squidge 101 Newbie Poster

@dalilice

Have you looked over the rather extensive FAQ, Knowledge Base, API documentation that is available at the creators website?

http://simplepie.org/

Squidge 101 Newbie Poster

Yes

<?php

$age = "really really really old :)";

?>

<h1>You are <?php echo $age; ?></h1>

NOTE
The cuse of age in this post is no idictaion of being agest

Squidge 101 Newbie Poster

Are u runing cmd with admin privs? Try rerunning te pear upgrade pear but make sure you are in the php directory

Squidge 101 Newbie Poster

I am guessing you have a database connection and table selection somewhere in one of the includes?

Squidge 101 Newbie Poster

looks like the PEAR install is all over the place.

I would suggest following http://pear.php.net/manual/en/installation.getting.php

This makes updating your pear easier, especially as it looks like the config is screwed

Squidge 101 Newbie Poster

conect this page to another page,

Can you provide more details on how you would expect this to be done?

a href, automatic redirect?

Squidge 101 Newbie Poster

But that doesnt explain where the login() function is coming from. Can you comment out the login function and echo the data. I think the error is the login(). Plus u havent answered where the $mysqli variable is coming from

Squidge 101 Newbie Poster

Try changing Line 14 to :

if(isset($_POST['logemail'] && $_POST['p'])) { 

Where is the login() function and $mysqli variable coming from?

Squidge 101 Newbie Poster

Typically functions will either be in a seperate file, or at the bottom of the php file:

<?php

yourname("Shamp");


function yourname($name){
    echo "Your Name is " .$name ;
}
?>

This works fine. Because you are calling a function with the assigned data. PHP then continues to look through the code, locates the function and triggers.

This also works:

$age = 18;

if($age >= 21){
    echo "Alan";
}
else{
    echo "Bob";
}

Only difference is the spacing around the math, and " instead of ' around the names

Squidge 101 Newbie Poster

Have you tried getting the image dimension using PHP, then passing the information into JQuery?

JQuery shouldn't be firing before the php (Client/Server)

Squidge 101 Newbie Poster

Would it not make more sense to get a single upload functioning first, then you can modify the coding for multi upload

Squidge 101 Newbie Poster

"\n" -> new line
"\t" -> tab
"\r" -> carriage return

Dude

but i wont a better explain

pritaes is well respected, and has taken time to help you. You clearly have not checked google, nor the search function on this web site.

All of what you are "wanting a better explaination" on is very easily searched via google. You seem to lack a basic understanding of "DO NOT BIT THE HAND THAT FEEDS".

I have watched the last few threads of yours and it appears you have ripped someone elses code and quite clearly do not know how it functions. Have you actually thought of contacting the individual that created it the first time round?

Squidge 101 Newbie Poster

Class and HTML should be seperate. Look here for a class on how to resize http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/

Squidge 101 Newbie Poster

Because ur include is firing the function straight away. That line shouldnt be there. Have a looked on php.net on how functions work? I would suggest u have a look

Squidge 101 Newbie Poster

Shazaammm

remove this line

if(!function_exists("makethumbnail"))

Squidge 101 Newbie Poster

good to hear, if this thread is now solved please mark it solved

Squidge 101 Newbie Poster

Ok, your not passing the required variables that you have set for the function:

if(!function_exists("makethumbnail"))
{
//die("right before function definition");
function makethumbnail($src,$new_name,$new_width,$new_height)
Squidge 101 Newbie Poster

Does this file exist: shopsite/thumbnail.php

Is it (from the file calling this), in the folder shopsite?

Squidge 101 Newbie Poster

remove line 4 from the index.php

Squidge 101 Newbie Poster

Looking at the site from where the code comes from : http://www.verot.net/php_class_upload_docs.htm

You could use:

$handle->image_watermark_x = 5; //change to fit your needs
$handle->image_watermark_y = 5; //change to fit your needs

Instead of

$handle->image_watermark_position = 'BR';

Which is a fixed predetermined location.

Squidge 101 Newbie Poster

From another site where the question of split() function alternative:

explode is an alternative. However, if you meant to split through a regular expression, the alternative is preg_split instead.

http://php.net/preg_split
http://php.net/manual/en/function.explode.php

Failing that http://bit.ly/UNY9gP

Squidge 101 Newbie Poster

Clue is in the error. split() is deprecated

Squidge 101 Newbie Poster

Line 48 looks to have an extra space, not sure if this would cause problems

$qry="INSERT INTO department(departmentName,userid,password) VALUES ('$department','$userid','$password')";

Also check your $_POST data to ensure it is populated:

var_dump($_POST);

As an added side note the ereg function is deprecated

http://php.net/manual/en/function.eregi.php

Squidge 101 Newbie Poster

The new form code uses submitted_departments.php please provide this code

Squidge 101 Newbie Poster

@Squidge : as mention above in departments.php, see the code once again, :)

The fields you refer to in your POST data are not that of your form fields

Your form fields:

<input type="text" name="regno" value="" style="width:224px" />
<input type="text" name=" Date" value="" style="width:224px"/></td>
<input type="radio" name="clearance" value="Yes"/>
<input type="radio" name="clearance" value="No"/></td>
<textarea name="RemarksClearance" rows="10" cols="50" style="width:224px"></textarea>
Squidge 101 Newbie Poster

ok, the error screen shot has all the information you need.

The form data that is being submitted has no relation to your $_POST variables.

$department=$_POST['Departments'];
$userid=$_POST['UserId'];
$password=$_POST['Password'];
$password2=$_POST['RetypePass'];

These do not exist in your POST

Squidge 101 Newbie Poster

to connect to a database you need the following information:

HOST => Generally is localhost
USER => What ever it is set as (would suggest not using root unless it is development)
PASSWORD => The password that is linked with the user
DATABASE TABLE => The table from which you wish to obtain information from.

If you have no password in the connection, your connection will fail. Think of it as logging in to an email account without a password (:))

http://php.net/manual/en/function.mysql-connect.php