LeadingWebDev
-
Posts
79 -
Joined
-
Last visited
Never
Posts posted by LeadingWebDev
-
-
localhost
default port specified in php.ini
-
i believe it should looks like nl2br($_POST['index']); to keep the \n\r if entered
alright, nl2br(); is for you.
-
correct will be like that
$query=mysql_query("SELECT * FROM `CES` WHERE `Name` IS NOT NULL"); while($row = mysql_fetch_array($query)) { echo "<option value=\"$row[server]\">$row[Name]</option>";
pay attention, you were chosen only Name from DB, where from you getting server?
second thing SELECT * works faster that SELECT `row`, `row` etc...
3rd, if you post name like ".$row[name]." its should be ".$row['name']." with quotes around index.
you can also use inside double quotes ("...") as echo "<option value= \"$row[server]\"> $row[NAME]</option>"; and so you won't quote index inside [].
also row name must be exactly as inside db, if your column named NAME it should be $row[NAME], if name $row[name], etc... else you will have blank result and notice undefined index.
sorry for soo bad english
-
what exactly u need to do?
to select option that is selected for people?
-
echo variables you pass to mysql
-
oops, my bad) didnt pay attention that is preg_match, thought preg_replace )
if (preg_match('/[^A-Za-z]/', $reg_username)) { $message="Your username can only contain letters."; }elseif (!preg_match('/[^A-Za-z]/', $reg_username)) {
-
if (preg_match('/[^A-Za-z]/', '', $reg_username)) { $message="Your username can only contain letters."; }elseif (!preg_match('/[^A-Za-z]/', '', $reg_username)) {
-
try this
function create_dropdown($identifier,$pairs,$firstentry) { // start dropdown list with the <select> element and title $dropdown = "<select name=\"$identifier\" method=\"post\" onchange=\"showtemplate(this.value)\">"; $dropdown .= "<option value=\"\">$firstentry</option>"; // Create the elements for inside the drop down box foreach($pairs AS $value => $tempname) { $dropdown .="<option value=\"$value\">$tempname</option>"; } //end the dropdown function and return it as html echo "</select>"; return $dropdown; }
-
i cant call myself pro as well, but exactly true way to check if file uploaded is to check tmp file, before preforming any actions with file.
-
check
$_FILES["field_name"]["tmp_name"] != "none"
this should work, as if file not uploaded, tmp name by default will come "none", and not null =)
also u can check filesize or name as u did before. name becomes null, size becomes 0
-
omg mwuahaha... :'( :'( :D i cry
-
it works for me as well like that
$body = preg_replace("/\r\n/","<br>", $row['body']);
check the query output so.
-
need to use inside preg_replace $row['body'] ?
try it.
-
-
did u tried header(); ?
or even redirect to thank page?
-
$wh = $sw."x".$sh;
if($wh =="1024x768") {
$max = 9;
}elseif($wh =="1440x900") {
$max = 14;
}
-
can we see a piece of code from login page?
-
i c how and where.
Good Luck
i just dont want to start begging, ill be much educated.
-
look...
this 1 is completely working on mimun-ishi.com
$name = $fname." ".$lname; //senders name $tel = "$phone"; //senders phone $recipient = "mimun.ishi@gmail.com"; //recipient $rec_copy = "mimun.leads@gmail.com"; $mail_body = "A new customer left his contact information for you to call him back \n"; $mail_body .= "First Name: $fname \n"; $mail_body .= "Last Name: $lname \n"; $mail_body .= "Passport Number: $tz \n"; $mail_body .= "Phone Number: $tel \n"; //mail body $subject = date("l d F Y")." New client want you to call him "; //subject $header = "From: ". $name . " <" . $tel . ">\r\n"; //optional headerfields //ini_set('sendmail_from', 'me@domain.com'); mail($recipient, $subject, $mail_body, $header); //mail command mail($rec_copy, $subject, $mail_body, $header);
-
TeamAtomic said you how to check, why u disagree... if somebody say what to do about ur trouble do it and post result to continue resolving ur problem!
-
seen? in query 'website' -> '$website'
SOLVED
-
$target_path="../artists photo/"; $target_path.=basename( $_FILES['uploadedfile']['name']); ... ..... ... $photo = $target_path;
if so u want to save file under original name:
$_POST['uploadedfile'] -> $_FILES['uploadedfile']['name']
-
echo $_SESSION['myusername'];
post result
-
Try this.
also in Header(); use a full path to url.
<?php if(isset($_SESSION['myusername'])) { echo " <form method='post' action='#Profile_comment'> <table class='pro_addcomment'> <tr> <td class='pro_add_h' colspan='3'>Add a profile comment</td> </tr> <tr> <td class='pro_add_text' colspan='2'> <textarea name='profilecomment' class='pro_add_input'></textarea> </td> <td rowspan='2' class='pro_view_pic' valign='top'> <img src='../Profile_pics/".$image."' style='width:50px; height:50px;' /> </td> </tr> <tr> <td class='pro_add_max'>Max 200 characters</td> <td class='pro_add_button'> <input class='acc_alerts_accept' name='add_comment' type='submit' value='Add Comment' /> </td> </tr> </table> </form> "; if(isset($_POST['add_comment'])){ include("config.php"); $Comment_user=$_GET['username']; $Comment_sender=$_SESSION['myusername']; $Comment_comment=$_POST['profilecomment']; $Profile_picture=$_SESSION['myavatar']; $sql="INSERT INTO biggartfp9_profile_comments_tempt (Comment_user, Comment_sender, Comment_date, Comment_content, Profile_picture)VALUES('$Comment_user','$Comment_sender', NOW(),'$Comment_comment', '$Profile_picture')"; $result=mysql_query($sql); if($result){ header("Location: profile.php?username=$Comment_user#Profile_comment"); } else{ } } else{ echo"<h1 class=status_red>Please Login to submit a comment!</h1>"; } } ?>
form actions with variables
in PHP Coding Help
Posted
post here main.php (login part) code