473,473 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

query was empty and login form just keeps looping

matheussousuke
249 New Member
The website opens, doesn't show any connection errors, but I can't make any query.

If I try to login, I get back to the login page, if I try to make a Search, I get an error inside the website field "Query was empty".


It happened when I moved the website to a domain folder, I configured everything correctly, so I don't know what's going on...


Now I moved it to another web host account, the full website's on the root, and I still get those errors.


Bellow is the main file, it is loaded by every page of the site:


Expand|Select|Wrap|Line Numbers
  1. <?
  2. /*session_start();*/
  3. include "configuration.inc.php";
  4. include "connect.php";
  5.  
  6. $day = date(d);
  7. $month = date(m);
  8. $year = date(Y);
  9.  
  10. $del = "delete from job_post where EXday = \"$day\" and EXmonth = \"$month\" and EXyear = \"$year\" ";
  11. $rdel = mysql_query($del) or die(mysql_error());
  12. ?>
  13. <HTML>
  14. <HEAD>
  15. <TITLE><?=$sitenameheading?></TITLE>
  16. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  17. <style type="text/css">
  18. <?= "$style"; ?>
  19. </style>
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. <link href="css/common.css" rel="stylesheet" type="text/css" />
  29. <link href="css/our_work.css" rel="stylesheet" type="text/css" />
  30. <script type="text/javascript">
  31.         var GB_ROOT_DIR = "./greybox/";
  32.     </script>
  33. <script type="text/javascript" src="greybox/AJS.js"></script>
  34. <script type="text/javascript" src="greybox/AJS_fx.js"></script>
  35. <script type="text/javascript" src="greybox/gb_scripts.js"></script>
  36. <link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" media="all" /></HEAD>
  37.     <BODY link="#000000" vlink="#000000" alink="#000000"  TOPMARGIN=0 MARGINHEIGHT=0">
  38.  
  39. <table width="900" border="0" cellpadding="0" cellspacing="0" align="center" background="../images/postbg2.jpg">
  40.  <tr>
  41.     <td></td>
  42. </tr>
  43.   <tr>
  44.     <td> <TABLE WIDTH=90  CELLPADDING=0 CELLSPACING=0>
  45.  
  46.         <TR>            <TD><div style="
  47.         background:url(../images/header.jpg);
  48.         width:900;
  49.         height:150;
  50.         border-color:#0099FF;
  51.  
  52.  
  53.                 border-width:1px;
  54.         border-style:solid;"></div>
  55. </TD>
  56.         </TR>
  57.       </TABLE></td>
  58.   </tr>
  59.   <tr>
  60.     <td><table width="100%" class="dott2" border="0" cellspacing="0" cellpadding="4">
  61.         <tr valign="top"> 
  62.           <td width="200">
  63.           <table width="200" class="dott3" border="0" cellpadding="2" cellspacing="0">
  64. <?
  65. if(!isset($uname) && !isset($upass)) {
  66.  
  67. echo " 
  68. <tr>
  69. <td bgcolor='$s4employersblock' height='05'></td>
  70.  
  71. </tr>
  72.  
  73. <tr> 
  74.  
  75.  
  76.  
  77.                 <td><strong> <font color='$s3white'><li class='menutext'><a href='http://$myurl/index.php'>HOME</a></font></li>
  78.                  </td>
  79.               </tr>
  80.  
  81.               <tr> 
  82.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/siteadmin/index.php'>Área restrita</a></li>
  83.                  </td>
  84.               </tr>
  85.  
  86.  
  87.  
  88.  
  89. <td bgcolor='$s4employersblock'><strong> <font color='$s3white'>&nbsp;$JOBSEEKERS</font></strong><br>
  90. <form name=jsl method='post' action='http://$myurl/jobseekers/login.php'>
  91. <table>
  92. <tr>
  93.     <td>$USERNAME1</td>
  94.     <td align=right> <input type='text' name='uname' size='15'></td>
  95. </tr>
  96.  
  97. <tr>
  98.     <td>$PASSWORD1</td>
  99.     <td align=right><input type='password' name='upass' SIZE='15'></td>
  100. </tr>
  101.  
  102. <tr>
  103.     <td colspan=2 align=right>
  104.     <input type=hidden name=job_id value=$_GET[job_id]>
  105.     <input type='submit' name=submit value='Entrar'></td>
  106. </tr>
  107.  
  108. <tr><td colspan=2 align=center> <a class=TN href=http://$myurl/jobseekers/forgot.php>Lembrar Senha?</a></td></tr>
  109.  
  110. </table>
  111. </form>
  112.                 </td>
  113.               </tr>
  114.  
  115. <tr> 
  116.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/login.php'>$LOGIN</a></li>
  117.                  </td>
  118.               </tr>
  119. <tr> 
  120.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/jobseeker_registration.php'>$JOINFORFREE</a></li>
  121.                  </td>
  122.               </tr>
  123.                             <tr> 
  124.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/post-resume.php'>$POSTRESUME</a></li></td>
  125.               </tr>
  126.               <tr> 
  127.                 <td bgcolor=$s12menu class='menutext'> <li class='menutext'><a href='http://$myurl/jobseekers/edit-resume.php'>$EDITRESUME</a></li></td>
  128.               </tr>
  129.               <tr> 
  130.                 <td bgcolor=$s12menu> <li class='menutext'>
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.                 <a href=\"http://$myurl/jobseekers/preview.php\" rel=\"gb_page[630, 500]\">{$VIEWRESUME}</a>
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.                 </li></td>
  161.               </tr>
  162.               <tr> 
  163.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/job-search.php'>$SEARCHJOBS</a></li></td>
  164.               </tr>
  165.               ";
  166.  
  167. }
  168. else
  169. {
  170.  
  171. echo "         <tr>     
  172.                 <td width='116' bgcolor='$s4employersblock'><strong> <font color='$s3white'>&nbsp;$JOBSEEKERS</font></strong><br>
  173. <tr> 
  174.                 <td width='116' bgcolor='#f2f2f2'><strong> <font color='#666666'>&nbsp;$WELCOME ".$_SESSION['uname']."</font></strong></td>
  175.               </tr>
  176. <tr> 
  177.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/index.php'>$HOME</a></li></td>
  178.               </tr>
  179.               <tr> 
  180.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/post-resume.php'>$POSTRESUME</a></li></td>
  181.               </tr>
  182.               <tr> 
  183.                 <td bgcolor=$s12menu class='menutext'> <li class='menutext'><a href='http://$myurl/jobseekers/edit-resume.php'>$EDITRESUME</a></li></td>
  184.               </tr>
  185.               <tr> 
  186.                 <td bgcolor=$s12menu> <li class='menutext'>
  187.  
  188.  
  189.  
  190.                             <a href=\"http://$myurl/jobseekers/preview.php\" rel=\"gb_page[630, 500]\">{$VIEWRESUME}</a>
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                 </li></td>
  197.               </tr>
  198.               <tr> 
  199.                 <td bgcolor=$s12menu class='menutext'> <li class='menutext'><a href='http://$myurl/jobseekers/upload.php'>$UPLOADIMG</a></li></td>
  200.               </tr>
  201.               <tr> 
  202.                 <td bgcolor=$s12menu class='menutext'> <li class='menutext'><a href='http://$myurl/jobseekers/cvupload.php'>$UPLOADCV</a></li></td>
  203.               </tr>
  204.               <tr> 
  205.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/job-search.php'>$SEARCHJOBS</a></li></td>
  206.               </tr>
  207.               <tr> 
  208.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/delete.php'>$DELETEACC</a></li></td>
  209.               </tr>
  210.               <tr> 
  211.                 <td bgcolor=$s12menu> <li class='menutext'><a href='http://$myurl/jobseekers/logout.php'>$LOGOUT</a></li></td>
  212.               </tr>
  213.  
  214.               ";
  215.  
  216. }
  217. ?>
  218.  
  219. <?
  220. $nResult = mysql_query("SELECT * FROM job_employer_info WHERE ename = \"$ename\" ");
  221.  
  222. $nRow = mysql_fetch_array($nResult);
  223.  
  224. if(!isset($ename) && !isset($epass)) {
  225.  
  226. echo "<tr><td height=164 bgcolor=#DEEDFF>
  227.  
  228.  
  229.  
  230.  
  231.  
  232.           <object width='200' height='250'
  233. classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'
  234. codebase='http://fpdownload.macromedia.com/
  235. pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'>
  236. <param name='SRC' value='http://mistercursos.com.br/images/banners/bannermg.swf'>
  237. <param name='scale' value='exactfit'/><embed src='http://mistercursos.com.br/images/banners/bannermg.swf' width='200' height='250'>
  238. </embed>
  239. </object>
  240.  
  241.  
  242. <td></tr>";
  243.  
  244.  
  245.  
  246.  
  247. echo "<tr> 
  248.                 <td bgcolor=$s4employersblock><strong><font color=$s3white>&nbsp; $EMPLOYERS</font></strong><br>
  249. <form name=el method='post' action='http://$myurl/employers/index.php'>
  250. <table>
  251. <tr>
  252.     <td>$USERNAME1</td>
  253.     <td align=right> <input type='text' name='ename' size='15'></td>
  254. </tr>
  255.  
  256. <tr>
  257.     <td>$PASSWORD1</td>
  258.     <td align=right><input type='password' name='epass' SIZE='15'></td>
  259. </tr>
  260.  
  261. <tr>
  262.     <td colspan=2 align=right>
  263.     <input type='submit' name=submit value='Entrar'></td>
  264. </tr>
  265.  
  266. <tr><td colspan=2 align=center> <a class=TN href=http://$myurl/employers/forgot.php>Lembrar Senha?</a></td></tr>
  267.  
  268. </table>
  269. </form>        </td></tr>
  270.               <tr> 
  271.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/PostJob.php'>$LOGIN</a></li></td>
  272.               </tr>
  273.               <tr> 
  274.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/registre-sua-empresa.php'>$REGISTER</a></li></td>
  275.               </tr>
  276.               <tr> 
  277.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/PostJob.php'>$POSTJOB</a></li></td>
  278.               </tr>
  279. <tr>
  280.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/EmployerSearch.php'>$SEARCH</a></li></td>
  281.               </tr>";
  282. }
  283. else
  284. {
  285. echo "
  286. <tr> 
  287.                 <td bgcolor=$s4employersblock><strong><font color=#FFFFFF>&nbsp; $EMPLOYERS</font></strong>
  288.                 </td></tr>              
  289. <tr> 
  290.                 <td width='116' bgcolor='#f2f2f2'><strong> <font color='#666666'>&nbsp;$WELCOME ".$_SESSION['ename']."</font></strong></td>
  291.               </tr>
  292. <tr> 
  293. <tr>
  294.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/index.php'>$HOME</a></li></td>
  295.               </tr>
  296.               <tr> 
  297.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/PostJob.php'>$POSTJOB</a></li></td>
  298.               </tr>
  299. <tr>
  300.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/employers7.php'>$MANAGEJOBS</a></li></td>
  301.               </tr>
  302.              <!-- <tr> 
  303.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/employers1.php'>$UPDATEPLAN</a></li></td>
  304.               </tr> !-->
  305.               <tr> 
  306.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/employers12.php'>$EDITINFOMENU</a></li></td>
  307.               </tr>
  308.               <tr> 
  309.                 <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/upload.php'>$UPLOADLOGO</a></li></td>
  310.               </tr>
  311.               <tr> 
  312.                               <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/EmployerSearch.php'>$SEARCH</a></li></td>
  313.               </tr>
  314.               <tr> 
  315.                               <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/delete.php'>$DELETEACC</a></li></td>
  316.               </tr>
  317.               <tr>
  318.               <tr> 
  319.                               <td bgcolor=$s12menu> <li class=menutext><a href='http://$myurl/employers/logout.php'>$LOGOUT</a></li></td>
  320.               </tr>
  321.               <tr>
  322.                  <td bgcolor='#9FC728'><strong><font color='$s3white'>&nbsp;Disponibilidade da Conta</font></strong></td>
  323.               </tr>
  324.               <tr> 
  325.                 <td>    
  326.                 $CANPOST <b>vagas.</b><br>
  327. $CANVIEW <b>currículos.</b> 
  328.                 </td>
  329.               </tr>";
  330. }
  331. echo"
  332.   <tr>
  333.     <td  bgcolor='$s4employersblock'><strong><font color=$s3white>&nbsp;&nbsp;</font></strong></td>
  334.   </tr>
  335.   <tr>";
  336.  
  337. $xa = "SELECT * FROM job_employer_info where featured = '1' order by ename asc LIMIT 10";
  338. $xb = mysql_query($xa) or die(mysql_error());
  339.   while($xc = mysql_fetch_array($xb))
  340.   {
  341. echo "<td bgcolor=$s4employersblock><li class=menutext>
  342.  
  343.  
  344.  
  345.     <a href=\"$site/employerview.php?ename=$xc[ename]\" rel=\"gb_page[630, 500]\">$xc[CompanyName]</a>";
  346.  
  347.  
  348.  
  349.   }
  350.  
  351. ?>
  352.             </table>
  353.           </td>
  354.           <td>
  355.  
  356.  
  357.  
  358. </BODY>
  359. </HTML>






Please help....
Oct 28 '11 #1
2 1535
omerbutt
638 Contributor
hi matheussousuke,
where is the code for the login.php file can you paste it here
regards,
Omer Aslam.
Nov 2 '11 #2
matheussousuke
249 New Member
Sorry, forgot to mark as solved. It's solved.
Nov 2 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Norman Bird | last post by:
I have a form i will use to register new people and when I click the submit button, the form just shows itself. It is supposed to show a message showing field errors if you leave fields blank etc....
1
by: Tim Nelson | last post by:
I am building a data bound application for SQL server which all the forms I use sqlconnections generated by VS. I want to have a login form that changes the connection depending upon login...
5
by: JPSutor | last post by:
I have a login form, that if successfully answered, launches another form. The problem is that the login form remains even after I show the main form. How do I get rid of the login form?
4
by: David Krussow | last post by:
Just wondering if/how it would be possible to display a variable string on the login form - where the string varies depending on the form the user attempted to access. To clarify, an...
13
by: Crouchie1998 | last post by:
What's the simplest way to create a login page in ASP.NET & VB.NET? Awaiting your reply, Crouchie1998 BA (HONS) MCP MCSE
3
by: Bob | last post by:
I haver a user login form (winforms app using vs2005 in VB.NET). After succesfull validayion of user I want to open a first form and close the loging form that was used, If I write If...
7
by: Nerrad | last post by:
Hi, i am currently working on a project which requires me to create a form to allow the user to change their password. I know there is a user-level security login which is easier and safer but...
3
by: stumo | last post by:
Hi I'm fairly new to access and as such my experience of VBA is somewhat limited. I have a login form which is linked to an "employees table" which asks for users to enter their name and...
19
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash...
3
matheussousuke
by: matheussousuke | last post by:
I dont get any error message, it's simple, some pages works ok, they simply show "Welcome, 'username'. LOGOUT (link)" The same as Bytes, when u login, u dont see the form anymore, u just see a...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.