looking over a google search states HTACCESS cannot be used to alter global text in the manner you are trying to do
Zagga commented: Nicely explained +4
Squidge 101 Newbie Poster
looking over a google search states HTACCESS cannot be used to alter global text in the manner you are trying to do
You are ending your message line and not actually including the returns:
$MESSAGE_BODY = "Name is contacting you from Mas Des Filles Contact Page" ."";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY = "Name: ".nl2br($_POST["contact_name"])."";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY .= "Email: ".nl2br($_POST["contact_email"])."";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY .= "Contact: ".nl2br($_POST["contact_tel"])."";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY .= "Message: ".nl2br($_POST["contact_query"])."";
"------------------------------------------------------------\n" .
mail($ToEmail, $EmailSubject, $MESSAGE_BODY) or die ("Failure");
Try:
$MESSAGE_BODY = "Name is contacting you from Mas Des Filles Contact Page" ."\r\n";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY = "Name: ".nl2br($_POST["contact_name"])."\r\n";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY .= "Email: ".nl2br($_POST["contact_email"])."\r\n";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY .= "Contact: ".nl2br($_POST["contact_tel"])."\r\n";
"------------------------------------------------------------\r\n" .
$MESSAGE_BODY .= "Message: ".nl2br($_POST["contact_query"])."\r\n";
"------------------------------------------------------------\n" .
mail($ToEmail, $EmailSubject, $MESSAGE_BODY) or die ("Failure");
Can you advise what u did so it can be searched for other users?
@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
No ducati????????;-)
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
have you tried dumping the information to make sure your variable is being populated?
var_dump($match);
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?
have you tried setting max-height?
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:
you need to echo inside your while loop
Can you show your form?
Also have tried var_dump($_POST);
to see if the varible is being populated?
looks to be a good way of doing it.
Scanning the documentation it seems this is a popular request for v2
@dalilice
Have you looked over the rather extensive FAQ, Knowledge Base, API documentation that is available at the creators website?
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
Are u runing cmd with admin privs? Try rerunning te pear upgrade pear
but make sure you are in the php directory
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
Would it not make more sense to get a single upload functioning first, then you can modify the coding for multi upload
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/
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
Shazaammm
remove this line
if(!function_exists("makethumbnail"))
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)
Does this file exist: shopsite/thumbnail.php
Is it (from the file calling this), in the folder shopsite
?
remove line 4 from the index.php
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 (:))
your db connection doesnt contain a password
JayJ, have you tried using return
on the variable you want to pass out?
// get simple_html_dom from http://simplehtmldom.sourceforge.net/
include_once('simple_html_dom.php');
// Add url in place of "URL"
$result = file_get_html(URL);
// Searchs for 'a' tags
$result_a = $result->find('a');
// Replace 'http://'
foreach($result_a as $resultA){
echo str_replace('http://','',$resultA);
}
// Show untouched
foreach($result_a as $resultA){
echo $resultA . "<br/>";
}
Should do it for you
sorry i dont want to say form it is from :)
Lol, no probs.
This is one that i have done.
http://www.daniweb.com/web-development/php/threads/434041/scrap-which-removes
Which should help.
$result = file_get_html('http://www.example.com/');
foreach($result->find('a') as $element){
$result = str_replace('http://', '', $result);
}
foreach($result->find('a') as $elementa){
echo $element->href;
echo $elementa->href;
}
As i edited in (may have been as you were replying), str_get_html
is used for loading in strings.
Try the above.
Also this is not a form
it is form
$html = file_get_html('http://www.example.com');
$result = $html;
From where are you populating $result
from?
As per the documentation around Simple HTML DOM, str_get_html is for loading a string.
Put your foreach loops in {}
$result = str_get_html($result);
foreach($result->find('a') as $element){
$result = str_get_html($result);
$result = str_replace('http://', '', $result);
}
foreach($result->find('a') as $elementa){
echo $element->href;
echo $elementa->href;
}
But it still isn't saving the question. Any ideas what I may be doing wrong. Any help would be appreciated.
Are you getting an error?
Have you dumped the POST data to make sure this is populated as you expect?
Have you tested your SQL strings?
if($row['banned'] == '1') {
header( 'http://www.awsomechat.comuv.com/ban/userbanned.php' );
} elseif ($row['banned'] == '2'){
header( 'http://www.awsomechat.comuv.com/ban/userbanned.php' );
}
Should these not read
header('location : http://www.awsomechat.comuv.com/ban/userbanned.php' );
&& ( :) )
header('location : http://www.awsomechat.comuv.com/ban/userbanned.php' );
they have different precedence.
True. &&
is before and
- ||
is before or
:)
I thought session_start()
had to be the first line before any output?
**Note:
To use cookie-based sessions, session_start() must be called before outputing anything to the browser. **
i have started using Netbeans. Very nice and easy to use. Best of all its free!!
I have also used Dreamweaver CS5.5 and 6
'$school_id'"),0, 'logs_id'));
Should this not be 1
?
This should help:
RewriteEngine On
RewriteRule ^([^/]*)$ /pages/fetchpage.php?id=$1 [L]
You need to use your imagination.
You have clearly stated
actually it is a project work which is to be represented in college.
glad i could help
If its solved, mark it so :)
Trees
Cars
Computers past-> present
Screws
Birds? where they are, what different types with images and search function, with migratory patterns
Really?
Thats is your own thing
i am totaly confused.
Which part are you confised about?
I do not beleive you can use mysql_real_escape_string within a SQL statement.
This should be done via to the INSERT
statement
Thanks for that squidge, I will take a look at that. Hopefully it won't take much.
No problem squeak24
You dont actually seem to be using any of the POST data.
Or have you not put all your code?
What's a portable software? and Is It even legal?
It is legal and illegal.
This one Click Here, is a collection of legal compact Apps available.
There are others, and i have in the past come across portable and cracked apps such as Dreamweaver, Flash etc. If it is under the Open Source license then yes this is all above board.
@LastMitch
If you take the code you have so far:
<form action="photoimage.php" method="post">
Photo: <input type="" name"" valve=" />
<br />
Caption: <input type="" name"" valve="" />
<br />
</form>
You would name the fields, i try to keep them as obvious as possibly.
<form action="photoimage.php" method="post">
Photo: <input name"photo" valve=" />
<br />
Caption: <input name"caption" valve="" />
<br />
</form>
So once you get to your photoimage.php
you will have a $_POST array available to you:
$_POST['photo']
$_POST['caption']
Then you can use those to add to a DB.
This is a gallery upload script which i used, and modified for my needs:
Click Here
Hope it helps