PHP - Link Coding Prob
Ok so my problem is i need to change the page link. Now if i click on the link (marked with red) it will link to the company website. So, instead of going to the website. I want to change it to link to another page which i created named (oscar.php on my index.php). But without removing the company logo on it. This is my 1st time encounter this type of case since im very new.
this is the index Code: [Select] <?session_start();?> <? include ('config.php'); include ('config_email.php'); include ('config_key.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>asia programs</title> <link rel="stylesheet" href="style.css" type="text/css" /> <script type="text/javascript" src="jquery/jquery.js"></script> <script type="text/javascript" src="jquery/thickbox/thickbox.js"></script> <link rel="stylesheet" href="jquery/thickbox/thickbox.css" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <link rel="stylesheet" href="jquery/jquery.treeview.css" /> <script src="jquery/lib/jquery.cookie.js" type="text/javascript"></script> <script src="jquery/jquery.treeview.js" type="text/javascript"></script> <link rel="stylesheet" href="css/globalslide.css"> <style type="text/css"> #footer2 { position:absolute; bottom:0; width:100%; height:140px; background: #000; opacity:0.9; filter:alpha(opacity=92); } /* for moz/opera and others*/ html>body #footer2{position:fixed} #footer2-inner{ height: 69px; background-color: black; } /* margin-bottom ensures last content is not obscured by footer */ #content { margin-bottom: 69px; }</style> </head> <body> <? if(isset($_GET[view])) { $view = $_GET[view]; } if(isset($_GET[content])) { $content = $_GET[content]; } if(isset($_GET[ttid])) { $ttid = $_GET[ttid]; } if(isset($_GET[mod])) { $mod = $_GET[mod]; } if(isset($_GET[note])) { $note = $_GET[note]; } if ($ttid <> ''){ if ($content == 'tips') { include (VIEWPAGE.'view_event_tooltip.php'); } if ($content == 'tesm') { include (VIEWPAGE.'view_event_testimonial.php'); } if ($content == 'psevent') { include (VIEWPAGE.'view_event_ps.php'); } if ($content == 'oscar') { include (VIEWPAGE.'view_event_description.php'); } if ($content == 'prospectus') { include (VIEWPAGE.'view_event_prospectus.php'); } if ($content == 'speaker') { include (VIEWPAGE.'view_event_speakerlist.php'); } } elseif ($ttid == ''){ ?> <div id="wrapper"> <? include ("header/header.php"); ?> <div id="main-content"> <? if ($content== ''){ if ($view == ''){ include (VIEWPAGE.'home.php'); include ("counter.php"); } if ($view == 'home'){ include (VIEWPAGE.'home.php'); } if ($view == 'about'){ include (VIEWPAGE.'view_aboutus.php'); } if ($view == 'sponsorship'){ include (VIEWPAGE.'view_sponsorship.php'); } if ($view == 'gallery'){ include (VIEWPAGE.'view_gallery.php'); } if ($view == 'subgallery'){ include (VIEWPAGE.'view_subgallery.php'); } if ($view == 'news'){ include (VIEWPAGE.'view_news.php'); } if ($view == 'subnews'){ include (VIEWPAGE.'view_subnews.php'); } if ($view == 'contact'){ include (VIEWPAGE.'view_contactus.php'); } if ($view == 'enquirysubmit'){ include (VIEWPAGE.'view_enquiry_thankyou.php'); } if ($view == 'career'){ include (VIEWPAGE.'view_career.php'); } if ($view == 'event'){ include (VIEWPAGE.'view_event_search.php'); } if ($view== 'spl'){ include (VIEWPAGE.'view_event_speakernote_list.php'); } } if ($view == 'home'){ if ($content== 'list'){ include (VIEWPAGE.'home.php'); } } if ($view == 'event'){ if ($content== 'list'){ include (VIEWPAGE.'view_event_searchlist.php'); } } if ($view == 'registration') { include (VIEWPAGE.'view_event_registration.php'); } if ($view == 'regmsgsuccess') { include (VIEWPAGE.'view_event_registration_msgsuccess.php'); } if ($view == 'regmsgerror') { include (VIEWPAGE.'view_event_registration_msgerror.php'); } if ($view == 'prospectus') { include (VIEWPAGE.'view_event_prospectus.php'); } if ($view == 'msgsuccess') { include (VIEWPAGE.'view_event_prospectus_msgsuccess.php'); } if ($view == 'msgerror') { include (VIEWPAGE.'view_event_prospectus_msgerror.php'); } if ($view == 'sn') { include (VIEWPAGE.'view_event_speakernote.php'); } if ($view == 'confirmation') { if ($mod == 'reg') { include (VIEWPAGE.'view_event_registration_insert.php'); } if ($mod == 'pro') { include (VIEWPAGE.'view_event_prospectus_insert.php'); } if ($mod == 'note') { include (VIEWPAGE.'view_event_speakernote_insert.php'); } if ($mod == 'ec') { include (VIEWPAGE.'view_event_speakernote_check.php'); } if ($mod == 'ecspreg') { include (VIEWPAGE.'view_event_speakernote_ecsuccess.php'); } } ?> </div> <? include ("footer/footer.php"); ?> </div> <? if (($view == 'home')|| ($view == '')){ ?> <? } } ?> </body></html> ok so this is the code for the page that i attached a photo of it Code: [Select] <? if(isset($_GET[ttid])) { $ttid = $_GET[ttid]; } $connection=mysql_connect("$server", "$username", "$password") or die("Could not establish connection"); mysql_select_db($database_name, $connection) or die ("Could not select database"); $query = "select master_event.* , (DATE_FORMAT(event_datefrom, '%d %M %Y')) as datefrom, (DATE_FORMAT(event_dateto, '%d %M %Y')) as dateto, ucase(event_name) as eventname from master_event where master_event.event_id = '$ttid '"; $result=mysql_query($query); while($row = mysql_fetch_array($result)){ $eventname = $row['eventname']; $eventdesc = $row['event_desc']; $companydescription = $row['company_description']; $eventvenue = $row['event_venue']; $eventfee = $row['event_fee']; $datefrom = $row['datefrom']; $dateto = $row['dateto']; echo "<font color='#000000' face='arial' ><b> $eventname </b> </font> <br>"; echo "<font color='#000000' face='arial' ><i>Date</i> : $datefrom - $dateto <br>"; echo "<i>Venue</i> : $eventvenue <br>"; $querypstype = "SELECT DISTINCT master_pstype.pstype_id, pstype_desc FROM master_pstype INNER JOIN master_psevent ON master_psevent.pstype_id= master_pstype.pstype_id where master_psevent.event_id = '$ttid' ORDER BY pstype_id"; $resultpstype=mysql_query($querypstype); while($rowpstype = mysql_fetch_array($resultpstype)){ $pstypeid = $rowpstype['pstype_id']; $pstypedesc = $rowpstype['pstype_desc']; echo "<br><font color='#8B3A3A' size='1' face='georgia' ><b><i>$pstypedesc</i></b></font> <br>"; $queryps = "SELECT master_psevent.*, pstype_desc, company_name, company_link, company_description, logo_filename FROM master_psevent LEFT JOIN master_pstype ON master_psevent.pstype_id = master_pstype.pstype_id LEFT JOIN master_ps ON master_ps.ps_id = master_psevent.ps_id WHERE master_psevent.event_id = '$ttid' and master_pstype.pstype_id= '$pstypeid' ORDER BY pstype_desc,company_name "; $resultps=mysql_query($queryps); while($rowps = mysql_fetch_array($resultps)){ $companyname = $rowps['company_name']; $companylinkori = $rowps['company_link']; $companydescription = $rowps['company_description']; if ($companylinkori <> "") { $companylink = "http://".$rowps['company_link']; } else { $companylink = ""; } $logopath = $rowps['logo_filename']; if ($companylink <> ""){ echo "<font color='#4A708B' face='arial' ><a href=$companylink style=\"color:white;text-decoration: none; \" target='new'><img src=".$logo_dir."/".$logopath." width=\"15%\"></img></a>  </font>"; } else { echo "<font color='#4A708B' face='arial' ><img src=".$logo_dir."/".$logopath." width=\"15%\"></img>  </font>"; } ?> <br> <? } echo "<br>"; } } ?> Similar TutorialsCode: [Select] $query = 'select * from ob_listings where categoryid=' . $_POST["category"] . ' and subject like '%$term%' or description like '%$term%''; i want the query to select all from the table ob_listings where categoryid=$_post["category"] AND then from the items that fit that category subject like '%$term%' or description like '%$term%'' not that familiar with sql statements hello guys, am getting prob in array_splice( ) . if i try to insert an element into an associative array, that element is converted into indexed array. <?php $capitals = array('USA' => 'Washington', 'Great Britain' => 'London', 'New Zealand' => 'Wellington', 'Australia' => 'Canberra', 'Italy' => 'Rome'); $france = array('France' => 'Paris'); array_splice($capitals, 1, 0, $france); print_r($capitals); ?> am getting output as Array ( [USA] => Washington => Paris [Great Britain] => London [New Zealand] => Wellington [Australia] => Canberra [Italy] => Rome ). pls guys help me on this...why key index is not printing as france instead of 0.. please check the following code. It gave me this error Warning: Code: [Select] array_map(): The first argument, 'self::prepSessions', should be either NULL or a valid callback public function resetSess(){ if($this->isLoggedIn){ session_regenerate_id(); $this->sessions = array( 'userId' => $_SESSION['userId'], 'username' => $_SESSION['username'], 'password' => $_SESSION['password'], 'uemail' => $_SESSION['uemail'], 'userLevel' => $_SESSION['userLevel'], 'userGroup' => $_SESSION['userGroup'], 'referrer' => $_SESSION['referrer'] ); $this->userdata = array_map("self::prepSessions", $this->sessions); }else{ return false; } } public function prepSessions($sessions){ if($this->isLoggedIn){ return $sessions; } } Hey guys, longtime reader first time poster. i seem to be having a pagination problem and i think that some fresh eyes are in order im sure its staring in front of me.......just cant see it Code: [Select] <?php global $main; $main->query('upgraded', "SELECT `auctions`.*, `categories`.* FROM `auctions` LEFT JOIN `categories` ON `category_id` = `auction_category_id` WHERE `auction_upgrade_color` = '1' ORDER BY `auction_id` DESC LIMIT {$main->upgraded_auctions_max}"); if (!$main->auth['logged_in']) { header('Location: ' . SITE_BASE . '/login/'); } ?> <div class="left"> <? include('php/inc.featured-listings.php'); ?> </div> <div class="right"> <?php #pagination $sql = "SELECT `auction_id` FROM `auctions` WHERE `auction_user_id` = {$main->auth[user_id]}"; $q = mysql_query($sql); $page_count = ceil(mysql_num_rows($q) / $main->auctions_per_page); $current_page = (int) $_GET['current_page'] > 0 && (int) $_GET['current_page'] <= $page_count ? $_GET['current_page'] : 1; $offset = ($current_page - 1) * $main->auctions_per_page; $order = in_array($_GET['order'], array('auction_id', 'auction_views', 'auction_title', 'category_name')) ? $_GET['order'] : 'auction_id'; #listings if (!$_GET['auction_id']): $title = 'My Current Listings'; #query for newest listings $sql = "SELECT `auctions`.*, `categories`.*, `users`.* FROM `auctions` LEFT JOIN `categories` ON `category_id` = `auction_category_id` LEFT JOIN `users` ON `user_id` = `auction_user_id` WHERE `auction_user_id` = {$main->auth[user_id]} GROUP BY `$order` ORDER BY `$order` DESC LIMIT $offset, {$main->auctions_per_page}"; $q = mysql_query($sql); ?> <table cellpadding="0" cellspacing="0" class="listings" style="width: 703px;"> <tr class="header"> <td colspan="5"><h2><?php echo $title; ?></h2></td> </tr> <tr class="title"> <td width="50%" class="lborder">Listing Title</td> <td width="15%">Created In</td> <td width="15%">Created By</td> <td width="15%">Listed On</td> <td width="5%">Views</td> </tr> <?php while ($r = mysql_fetch_assoc($q)): ?> <tr class="listing<?php echo $r['auction_upgrade_color'] == '1' ? ' orange' : ''; ?>"> <td class="listing-title"><a href="/auction/<?php echo $r['auction_id']; ?>-<?php echo niceurls($r['auction_title']); ?>.html"><?php echo $r['auction_title']; ?></a></td> <td><a href="/category/<?php echo $r['category_url']; ?>/"><?php echo $r['category_name']; ?></a></td> <td><a href="/user/<?php echo $r['user_id']; ?>/"><?php echo $r['user_name']; ?></a></td> <td><?php echo howlongago($r['auction_time_listed']); ?></td> <td><?php echo number_format($r['auction_views']); ?></td> </tr> <?php endwhile; ?> </table> <div class="pagination"> <?php for ($i = 1; $i <= $page_count; $i++): ?> <a href="./?current_page=<?php echo $i; ?>"<?php echo $i == $current_page ? ' class="current"' : ''; ?>><?php echo $i; ?></a> <?php endfor; ?> </div> <?php endif; ?> </div> thanks in advance and yes i can laugh at myself this is my code Code: [Select] <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>"> <p> <label for="onoma">Όνομα<br /> </label> <input name="onoma" type="text" id="onoma" size="40" /> </p> <p> <label for="epitheto">Επίθετο</label> <br /> <input name="epitheto" type="text" id="epitheto" size="40" /> </p> <p> <label for="Email">Email<br /> </label> <input name="Email" type="text" id="Email" size="40" /> </p> <p> <label for="Thlefono">Τηλέφωνο</label> <br /> <input name="Thlefono" type="text" id="Thlefono" size="40" /> </p> <p>Διεύθυνση<br /> <label for="die"></label> <input name="die" type="text" id="die" size="40" /> </p> <p>Ημερομηνία που επιθειμείτε να γίνει η Κρατηση<br /> <input name="hmerominia" type="text" id="hmerominia" size="40" /> </p> <p>Ωρα στην παραπάνω ημερομηνία που επιθειμείτε <input name="wra" type="text" id="wra" size="40" /> </p> <p> <label for="Minima">Άλλο Μύνημα</label> <br /> <textarea name="Minima" id="Minima" cols="50" rows="10"></textarea> </p> <p> <input type="submit" name="submit" id="submit" value="Submit" /> </p> <input type="hidden" name="MM_insert" value="form1" /> <br/> </form> <?php if (is_null($_POST)) { echo "<h4>Η επικύρωση της κράτησης θα γίνει απο εμάς τηλεφωνικά<br /> στο τηλέφωνο που εισάγατε. </h4> <h4>Η διαδικασία κράτησης διαρκεί 1 ημέρα</h4>"; } else{ echo "eyxaristoume kyrie"; echo $_REQUEST["onoma"]; echo " "; echo $_REQUEST["epitheto"]; echo "poy kanante kratisi sto katastima maestros" ;} ?> and this is the form action Code: [Select] <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO kratisi (onoma, epi8eto, thlefono, dieuthinsi, email, hmerominia, wra, minima) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['onoma'], "text"), GetSQLValueString($_POST['epitheto'], "text"), GetSQLValueString($_POST['Thlefono'], "text"), GetSQLValueString($_POST['die'], "text"), GetSQLValueString($_POST['Email'], "text"), GetSQLValueString($_POST['hmerominia'], "text"), GetSQLValueString($_POST['wra'], "text"), GetSQLValueString($_POST['Minima'], "text")); mysql_select_db($database_maestr, $maestr); $Result1 = mysql_query($insertSQL, $maestr) or die(mysql_error()); $insertGoTo = "contact.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?>i want to make the form work like this when someone gets to that for first time to say something at the bottom and when he pushes the submit button it will say thank you i tried to do it with post if post is empty to say something and when it isnt empty to say thank you but it doesnt work where is my fault if someone can help me.. Hey all, I have a CRUD php project I am working on. I have insert working reading and deleteing. The only one I have left is update. My page submits the form but when the btn is clicked my page refreshes and does not update in the db. All the controls are cleared. Im assuming I’m missing something simple or just have a small mistake that is running past me, <?php error_reporting(E_ALL & ~E_NOTICE); // include config for Database require_once "php/config.php"; // Declare the variables that will be used. $name = $language = $datenow = ""; $nameerror = $langerror = $dateerror = ""; // Process form data when its submitted if(isset($_POST["id"]) && !empty($_POST["id"])) { // Get hidden input value. $id = $_POST["id"]; $input_name = trim($_POST["name"]); if(empty($input_name)) { $nameerror = "Name is required. "; } elseif (!filter_var($input_name, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^[a-zA-Z\s]+$/")))) { $nameerror = "Please enter a valid name. "; } else { //$namesafe = mysqli_real_escape_string($connection, $input_name); $name = $input_name; } // Validate language entered $input_lang = trim($_POST["language"]); if(empty($input_lang)) { $langerror = "Please enter a language. "; } else { $language = $input_lang; } // Get current Date and Time $currentDate = date("Y-m-d H:i:s"); // OR $datetimeobj = new DateTime(); $datetimeobj->format("Y-m-d H:i:s"); //if(empty($nameerror) && empty($langerror) && empty($dateerror)) { if($name != "" && $language != "") { $sql = "UPDATE users SET name=:name, language=:language, " . "date=:date WHERE id=:id"; error_log($sql); if($stmt = $pdoConnect->prepare($sql)) { $stmt->bindParam(":name", $param_name); $stmt->bindParam(":language", $param_lang); $stmt->bindParam(":date", $param_date); $stmt->bindParam(":id", $param_id); $para_name = $name; $param_lang = $lang; $param_date = $date; $param_id = $id; if($stmt->execute()) { header("location: index.php"); exit(); } else { echo "Something went wrong, try again later."; } } } else { $errormsg = '<div > 'All fields are required to continue</div>'; } unset($stmt); unset($pdoConnect); } else { if(isset($_GET["id"]) && !empty(trim($_GET["id"]))) { $id = trim($_GET["id"]); $sql = "SELECT * FROM users WHERE id = :id"; if($stmt = $pdoConnect->prepare($sql)) { $stmt->bindParam(":id", $param_id); $param_id = $id; if($stmt->execute()) { if($stmt->rowCount() == 1) { $row = $stmt->fetch(PDO::FETCH_ASSOC); //$id = $row["id"]; $name = $row["name"]; $language = $row["language"]; $userdate = $row["date"]; } else { header("location: error.php"); exit(); } } else { echo "Something went wrong with UPDATE, try again later."; } } // Close $stmt statement unset($stmt); // Close connection unset($pdoConnect); } else { // URL doesn't contain valid 'id' parameter. header("location: error.php"); exit(); } } ?>
Hi. So I've coded many a file upload form and never had any trouble. Until now. For some reason when I try to upload MP3 files, I'll hit submit and the page just reloads. Once it does so, the file upload field is once again blank. What's odd is that images and documents upload just fine. It's only audio tracks that cause the page to reload and clear. My php.ini max file upload size is at this point set to 100M, and the files I'm trying to upload are under 10M. Any ideas? Here's the form code, just to post it-- pretty basic. I'm at a loss here.... Any ideas would be appreciated. Thanks very much. <form action="test.php" enctype="multipart/form-data" method="POST"/> <input type = "file" name = "audio" /> <p><input type ="submit" name="submit" value="do it."/><p> </form> Hello.
I have a bit of a problem. When I fetch the link field from the database.i don't see an actual link on the page.
One more thing, what type of field should I use to store the link in the database? Probably there is where I went wrong.
All help is
Hi I've got this database I created with fields ProductId ProductName Image I've managed to get it to list the ID,productname, and Image urls in a list. My next step is to have the image field actually display an image and make it clickable: heres what I've done so far: Code: [Select] <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("productfeed", $con); $result = mysql_query("SELECT * FROM productfeeds"); echo "<table border='0'> <tr> <th>Firstname</th> <th>Lastname</th> <th>Image</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ProductID'] . "</td>"; echo "<td>" . $row['ProductName'] . "</td>"; echo "<td>" . $row['ImageURL'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Heres what I want to do: Code: [Select] while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ProductID'] . "</td>"; echo "<td>" . $row['ProductName'] . "</td>"; // my changes beneath echo "<td>" . <a href="<?php echo $row['ImageURL'];?>"> <img src="<?php echo $row['LinkURL']; ?>"> </a>. "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Can you guys point me in the right direction? Many thanks Hi Support, I have a form, where it collects user description input. I can collect the inputs and store it with newline. The issue is - how to collect the http link to actual hyperlink ref during display. The following is my code: <textarea name="description" cols="50" rows="10" id="description"><?php echo str_replace("<br>", "\n", $description);?></textarea></td> For example, User input: Hi, Check it out - http://www.google.com/ I would like to display google link as href so that Viewers can click the link and go to the page. Right now, it is not href and user need to copy the link to new tabs or pages and then it can come. Thanks for your help. Regards, Ahsan here's my code that i've used to send an email. Code: [Select] $link = "<a href=\"http://www.example.com/" . $num . "\">" . $num . "</a>"; $query = "SELECT content FROM emails"; $result = mysql_query($query) or die(); $email_content = mysql_result($result, 0); $email = sprintf($email_content, $first, $name, $from, $link, $record, $rec, $inc, $max); $email_body = stripslashes(htmlentities($email, ENT_QUOTES, 'UTF-8')); // this is sent to another php script via post.... $subject = $_POST['subject']; $message = nl2br(html_entity_decode($_POST['email_body'])); $to = "me@whatever.com"; $charset='UTF-8'; $encoded_subject="=?$charset?B?" . base64_encode($subject) . "?=\n"; $headers="From: " . $userEmail . "\n" . "Content-Type: text/html; charset=$charset; format=flowed\n" . "MIME-Version: 1.0\n" . "Content-Transfer-Encoding: 8bit\n" . "X-Mailer: PHP\n"; mail($to,$encoded_subject,$message,$headers); in the db, emails.content is of the text type and contains several lines of text with %4$s which inserts the value of $link into the body. when the email arrives, there is a link and it appears fine, with the value of $num hyperlinked. however when you click on it it doesn't go anywhere. when copying the link location from the email it gives me x-msg://87/%22http://www.example.com/16 what is x-msg? how can i get this to work properly? hi hope you all are fine. i have been working on a Email Form (like user fills up the form which send the information to our email) but i was having problem with (URL field i created) link of form is (http://services.shadowaura.com/allquotations/static.php) field which is not working is "Inspirational Website:" when i submit the form it says (Forbidden You don't have permission to access /allquotations/staticworking.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.) Can some one help me out ????????????? code behind this form is: Code: [Select] <?php /* Email Variables */ $emailSubject = 'Shadow Aura Contact Info!'; $webMaster = '*****@shadowaura.com'; /* Data Variables */ $Name = $_POST['Name']; $email = $_POST['email']; $Cell = $_POST['Cell']; $Phone = $_POST['Phone']; $CompanyName = $_POST['CompanyName']; $TypeOfBusiness = $_POST['TypeOfBusiness']; $Address = $_POST['Address']; $YourBudget = $_POST['YourBudget']; $HaveDomain = $_POST['HaveDomain']; $RunningWeb = $_POST['RunningWeb']; $WebLink = $_POST['WebLink']; $Inspiration1 = $_POST['Inspiration1']; $Inspiration2 = $_POST['Inspiration2']; $NumberPages = $_POST['NumberPages']; $UseFlash = $_POST['UseFlash']; $TimeFrame = $_POST['TimeFrame']; $Provided = $_POST['Provided']; $Comments = $_POST['Comments']; $body = <<<EOD <h1> Static Website Quotation </h1> <br> <b>Name of Client:</b>$Name<br> <b>Your Email:</b>$email<br> <b>Cell Number:</b>$Cell<br> <b>Line Phone Number:</b>$Phone<br> <b>Company Name:</b>$CompanyName<br> <b>Type of Business:</b>$TypeOfBusiness<br> <b>Address:</b>$Address<br> <b>Your Budget:</b>$YourBudget <br> <b>Do you have Domain:</b>$HaveDomain<br> <b>Your Site is Running:</b>$RunningWeb <br> <b>Website Link:</b><a href="$WebLink">$WebLink</a><br> <b>Inspiration:</b>$Inspiration1<br> <b>2nd Inspiration:</b>$Inspiration2<br> <b>Number of Pages:</b>$NumberPages<br> <b>Use Flash:</b>$UseFlash <br> <b>Time Frame:</b>$TimeFrame<br> <b>You will provide:</b>$Provided<br> <b>Comments:</b>$Comments<br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); /* Results rendered as HTML */ $theResults = <<<EOD <html> <head> <title>sent message</title> <meta http-equiv="refresh" content="3;URL=http://services.shadowaura.com/"> <style type="text/css"> <!-- body { background-color: #8CC640; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 20px; font-style: normal; line-height: normal; font-weight: normal; color: #fec001; text-decoration: none; padding-top: 200px; margin-left: 150px; width: 800px; } --> </style> </head> <div align="center">Your email will be answered soon as possible! You will return to <b>Shadow Aura Services</b> in a few seconds !</div> </div> </body> </html> EOD; echo "$theResults"; ?> I have a line like this it prints text link but I prefer image link how should i edit it I would appreciate some feedback Code: [Select] $templates['etiket'] = array('name' => t('ETİKET'), 'module' => 'uc_invoice_pdf', 'path' => $templates_uc_invoice_pdf_path, 'pdf_settings' => $pdf_settings); Hi guys, I'm using a twitter script that grabs the title and publishings it like so: "Title - Read More at..." I was wondering how i would be able to post the direct link into twitter.. like news.php?id=1 for example. Code: [Select] $tweet->post('statuses/update', array('status' => ''.$_POST[title].' - more at MY URL')); This part is in the script to publish automatically when the users adds to the news database. How am i able to get the ID just after the posting of the news? Thanks! Is there a way i can make a php code for making a lesson then upload to my made system? Im newbie here. so basically, i need to make an e-learning system that lets the user make a lesson then upload it so that other user can view their made lesson.. Someone help me pls. I'm unable to update the table. Could someone tell me why? $dfield1 = mysql_real_escape_string($field1); $dfield2 = mysql_real_escape_string($field2); $dfield3 = mysql_real_escape_string($field3); $dfield4 = mysql_real_escape_string($field4); $result =sprintf("SELECT * FROM db1 WHERE username ='%s'", $dfield1); $resultf = mysql_query($result); if (mysql_num_rows ($resultf) > 0){ $register = "&err=Not Available. Retry."; echo($register); } else { mysql_query("INSERT INTO db1 (name, birthday, street, phone) VALUES ('$dfield1', '$dfield2', '$dfield3', '$dfield4')"); $register = "Successful."; echo($register); } I am self taught and am trying very hard to get a log in page to work. The way i want it to work is that when they log in it uses a url stored in the database for their account. But i am having some much trouble working out a code that works and this is all i got: <?php include ('connection.php'); $username=$_POST['username5']; $password=$_POST['password5']; $query="SELECT password FROM merchants WHERE username = '$_POST(username5)'"; if ($password == $query) { $url = "SELECT url FROM merchants WHERE username = '$_POST(username5)'"; header("Location: $url"); } else { echo urgh } ?> Could some one please guide me to a possible script to accomplish this task.... I want to pull and display two separate things that are in two separate places and display them as one link on a page. I have figured out how to display the data to a page and also how to display the files to a page separately but need to accomplish this and join the 3 things together. I have a library table in the database that stores the product_code and product_name example: pk-pen(product_code) traditional fountain pen(product_name) ---- (this is where I need to get the data from) Then I have a folder on the server that is called library that has the pdf files in it. Each pdf file has the same name as the product_code that is in the database. example: pk-pen_ins.pdf What I need to accomplish is grabbing the product_code and product_name for the database and then go to the folder on the server and add the correct pdf file with that data and display it as a link on a page for customers to download. bee struggling with this and pasted code that i have to do each task separately but cant seem to get it all in one script to do the above. I understand that this could be asking for a lot here but I am new to this and would be forever in debt to your kindness. Thanks on this in advance Hai everbody; I am finishing my site to open for public but before i have a small problem! Actually I am using SMF forum software! I need this help very urgently ! Just need to add login (logout) & register in the template menu!! Please guys try to help me out !! I will join the index_template.php file for you to make the correction ! (sorry for my bad english) Thank You a LOT in advance Daya I have a small mp3 script and its running accurately ...i want to check the mp3 URL before playing it whether the mp3 link active or broken ....how to check the link is active or broken in php thanks |