hai
iam new php.
i am creating admin side. i wrote this, phpcode: -
<?php //include_once("config.php");
-
$con=mysql_connect("localhost","root","");
-
mysql_select_db("happysalary");
-
?>
-
-
-
-
<div class="menubar">
-
<table class="pathway_toolbar white">
-
<tbody><tr>
-
<td class="mod_pathway"><div class="pathway">
-
<a href="home.php"><strong>HappySalary.com</strong></a>Freshers</div></td>
-
<td class="mod_toolbar" align="right">
-
<?php $fun=$_REQUEST['fun'];
-
if($fun=="send")
-
{
-
?></td></tr></tbody></table>
-
<table class="adminform">
-
-
<tbody><tr>
-
<th width="20" colspan="3">Send New Fresher Jobs</th>
-
-
</tr>
-
<form name="fresher" method="post" enctype="multipart/form-data">
-
-
-
<tr>
-
<td>Header :</td> <td><input name="header" type="text" value="<? echo $header;?>" size="81"></td><td width="650"> </td></tr>
-
<tr><td>JobLinks :</td>
-
<td>
-
<textarea name="textarea" cols="78" rows="15"></textarea>
-
-
</td>
-
</tr>
-
<tr><td ><input type="submit" name="send" value="Send" class="enter" ></td></tr>
-
</form>
-
</tbody>
-
</table>
-
-
<?php
-
if($_POST['send'])
-
{
-
$headers=$_POST['header'];
-
$subject=$_POST['textarea'];
-
-
$email=$_REQUEST['email'];
-
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
-
-
$headers .= "\nMIME-Version: 1.0\n" .
-
"Content-Type: multipart/mixed;\n" .
-
" boundary=\"{$mime_boundary}\"";
-
-
$message .= "This is a multi-part message in MIME format.\n\n" .
-
"--{$mime_boundary}\n" .
-
"Content-Type:text/html; charset=\"iso-8859-1\"\n" .
-
"Content-Transfer-Encoding: 7bit\n\n" ;
-
-
-
if(!mail($email,$subject,$message,$headers))
-
{
-
die ("".EMAIL_DIE."");
-
}
-
-
mysql_query($sql) or die(mysql_error());
-
}
-
-
}else{
-
$sql="select * from register";
-
$result=mysql_query($sql);
-
$i=mysql_num_rows($result);
-
?>
-
-
<table id="toolbar" border="0" cellpadding="0" cellspacing="0">
-
<tbody><tr align="center" valign="middle">
-
<td> </td>
-
<td><a class="toolbar" href="home.php?option=fresher&fun=send">
-
<img src="/administrator/images/massemail.png" alt="New" name="new" title="New" align="middle" border="0"> <br>SendJobs</a>
-
</td></tr></tbody></table></td>
-
-
-
</td>
-
-
</tr>
-
</tbody></table>
-
<div class="clr"></div>
-
</div>
-
<div id="inner" align="center">
-
-
<table class="adminlist">
-
<tbody>
-
<tr>
-
<form name="adminForm" >
-
<th width="20">#</th>
-
<th width="20">
-
<input name="toggle" onClick="checkAll(<?php echo $i;?>);" type="checkbox">
-
</th>
-
<th width="20%" class="title">
-
UserName </th>
-
<th nowrap="nowrap" width="20%">
-
Email id </th>
-
<th nowrap="nowrap" width="20%">
-
Key Skills </th>
-
<th nowrap="nowrap" width="20%">
-
Experience (years) </th>
-
<th nowrap="nowrap">
-
Date of Registered </th>
-
-
-
-
-
<?
-
$pageLimit = 15;
-
$noPages = ceil($i / $pageLimit);
-
$currentPage = 0;
-
if(isset($_GET['pag']) && is_numeric($_GET['pag']) && $_GET['pag'] > 0 && $_GET['pag'] < $noPages)
-
{
-
$currentPage = $_GET['pag'];
-
}
-
$start = $currentPage * $pageLimit;
-
$val=0;
-
$sql="select * from register where years='$val' LIMIT ".$start.",".$pageLimit;
-
-
$result=mysql_query($sql) or die("error");
-
$a=0;
-
while($list=mysql_fetch_array($result))
-
{
-
$a=$a+1;
-
?>
-
<tr class="row0" height="30">
-
<td align="right"><?php echo $a ?></td>
-
<td><input id="cb<? echo $a;?>" name="cid[]" value="<? echo $list['username'];?>" onClick="isChecked(this.checked);" type="checkbox"></td>
-
<td>
-
<?php echo $list['username'];?>
-
</td>
-
<td align="center">
-
<?php echo $list['email'];?>
-
</td>
-
<td align="center">
-
<?php echo $list['keyskills'];?>
-
</td>
-
<td align="center">
-
<?php echo $list['years'];?>
-
</td>
-
<td align="center">
-
<?php echo $list['registerdate'];?>
-
</td>
-
</tr>
-
<?php } ?>
-
<?php $a=$a+1; } ?>
-
<input name="checkedid" type="hidden">
-
<input name="boxchecked" type="hidden">
-
<?
-
echo "<tr align=\"center\"> <th align=\"center\" colspan=\"8\">Pages ";
-
for($b = 0; $b < $noPages; $b++){
-
if($currentPage == $b){
-
echo($b+1);
-
}else{
-
echo '<a href="'.$_SERVER['PHP_SELF'].'?option=fresher&pag='.$b.'">'.($b+1).'</a>';
-
}
-
if($b < $noPages - 1){
-
echo '-';
-
-
}
-
}
-
echo "</th></tr>";
-
?>
-
-
-
</form>
-
<?php
-
-
-
mysql_connect("localhost","root","");
-
mysql_select_db("happysalary");
-
$result=mysql_query("select * from register");
-
//echo $email;
-
//$result=mysql_query("select title,heading,content,date,id from news order by date ASC limit 0,20");
-
while($list=mysql_fetch_array($result))
-
?>
-
<a class="blacktext10" href="administrator/home.php?option=fresher&fun=send?id=<?php echo $list['id'];?>"><br /><? echo $list['email'];?></a>
-
<?php
-
-
-
//$date=$_REQUEST['date'];
-
mysql_connect("localhost","root","");
-
mysql_select_db("happysalary");
-
$id1=$_REQUEST['id'];
-
$result=mysql_query("select email from register where id='$id1'");
-
//echo $result;
-
while($list=mysql_fetch_array($result))
-
{?>
-
-
<? echo $list['email'];?>
-
-
-
-
<?
-
}
-
?><a href="administrator/home.php?option=fresher?id=<? echo $list['id'];?>"><br /><table><tr><td><? echo $list['email'];?></a></td></tr></table>
-
-
-
-
-
</tbody>
-
</table>
[Please use CODE tags when posting source code. Thanks! --pbmods]
actually i want joblinks(textar ea) is there know,i want email displayed on textarea(samepa ge is there in code)
so please post the php code for how to emails to same page.[REMOVED. --pbmods]
1 2023 pbmods 5,821
Recognized Expert Expert
Heya, nagamalli26.
I award 2 points for creative use of phpcode. Unfortunately, I have to deduct 2 points for not using [code] tags, and I have to deduct an additional 14 points for specifying 'hi' as the title of your thread.
Better luck next time.
Also, please do not ask people to email or PM the solutions to you; that is not what TheScripts is all about. By posting solutions to the forum for everyone to see, we help build the *community* that brings developers together to share knowledge and experience.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: James Hong |
last post by:
Help please, I try to sending an email from my html page using the java
applet.
but it give error on most of the PC only very few work, what is the error i
make
the java applet show as below
**********************************
package Celcom.Client;
|
by: bojanraic |
last post by:
Hi!
I recently started playing with Python CGI, and I was happy that my
basic input-name--print-hello-name CGI form example worked, so I
thought I should advance to somew\hat more complicated scripts.
I'm trying to write a basic Python email CGI script to send email
through HTML email form.
I've seen a lot of examples out there, but nothing I tried so far
seemed to work. So I would like to know what I am doing wrong.
|
by: dmiller23462 |
last post by:
So here's my problem.....I need to set up different email
distributions based on which option in the following Select form has
been chosen....For instance if "Putaway" is chosen it needs to email
User1@here.whatever and User4@here.whatever but if "Loaded" is chosen
it needs to email User2@here.whatever and User3@here.whatever, etc,
etc...
I'm aware that the only thing that really needs to change is the
"Mail.AddAddress" line (at least...
|
by: Mike |
last post by:
Is there a way to determine what a user's default email client is? I
read a post from 3 years ago that said no. I guess I'm hoping
something has come along since then.
|
by: web_design |
last post by:
I put this together from some other scripts I am using on a site. I'm
trying to make a better email hiding script. It isn't working. Also, it
causes Internet Explorer 6 SP2 to block the script as "active content". :(
The idea is that if the user doesn't have JavaScript enabled, they will see
an image of the email address (that can't be read by email harvesting
programs). If JavaScript is enabled, the image will be hidden and the...
| |
by: danielboendergaard |
last post by:
Hey
Im making a homepage in php. I use a html form to put data into mysql
and i want to make some buttons which inserts user input values into a
textarea. I have used a button like this:
<input type="button" value="Add Quote"
onclick="document.getElementById('nyhed').value+=''">
The button works fine and insterts into the textarea.
Although I want to make a button which onclick asks the user for a
|
by: stirrell |
last post by:
Hello,
One problem that I had been having is stopping email injections on
contact forms. I did some research, read up on it and felt like I had
created a working solution. I hadn't gotten any suspicious bouncebacks
in quite some time and got many custom alerts I had set up for
notifying me of injection attempts. However, just the other day, I got
a bounceback from an AOL address which leads me to believe that an
injection attempt was...
|
by: cutlass |
last post by:
Need you assistance to anyone who is willing to offer. I have been working on this script and can't get it to work.
The issue I'm having is the statement:
function validateSender($Address) {
if (strpos($Address, '@') !== FALSE && strpos($Address, '.') !== FALSE) {
return true;
}
else if (validateSender($_GET) == false) {
|
by: creative1 |
last post by:
When I test the application I get follwowing error:
could not connect to smtp host: connection timeout error
can someone please check if I have rigth settings? Where I am wrong here
Is IP and mail host setting ok or not?
Contactus.jsp
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN//">
<html>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |