xux
Members-
Posts
85 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
xux's Achievements
Member (2/5)
0
Reputation
-
Hi Everybody, Please I need HELP.Thanks
-
Stopping Newsletter from going to Yahoo Bulk Mail;Help Needed.
xux posted a topic in PHP Coding Help
Hi, I have a newsletter where people signed up and expect to receive it once a month,but the challenge is most of it end up in YAHOO bulk mail.And since people seldomly check their bulk mail I am recieving complaints from people.Please WHat can I do about this?Thanks a bunch XUX -
Hi, Please I want to add the ability to archive previous newsletter issues to my newsletter script.Please who have any idea on how to go about it.Thanks in advance. My Regards XUX
-
[code] <?php $pageNo = $HTTP_GET_VARS['p'];//the page number $displayLength = 5;//the number of news to display per page @$db = mysql_pconnect('localhost', '', ''); if(!$db){ echo" ERROR: </b>Could not connect to database. Please try again later"; exit; } mysql_select_db('DB') ; $query = "SELECT title, picture, content FROM news ORDER BY expiry_date DESC LIMIT ".($pageNo*$displayLength).", ".$displayLength; $result = mysql_query($query); $query1 = "select count(*) from news"; if($result){ for($a=0;$a<$displayLength;$a++){ $row = mysql_fetch_array($result); $title = $row['title']; $picture_url = $row['picture']; $content = $row['content']; //print the news if($title){ echo "<p style=\"color: rgb(147, 3, 187); font-weight: bold;\"><u>$title</u></p>"; if($picture_url) echo "<img src=\"$picture_url\" alt=\"Picture\" align=\"right\" border=\"0\" hspace=\"5\" vspace=\"5\">\n"; echo $content; }else{ break; } } $query = "SELECT count(*) FROM news"; $result1 = mysql_query($query); $row = mysql_fetch_array($result1); $dbSize = $row[0]; $availableNoOfPagesInDB = $dbSize/$displayLength; $nextPage = $pageNo+1; $previousPage = $pageNo-1; echo "<p align=\"right\">"; ?> [/code]
-
[code] <?php $pageNo = $HTTP_GET_VARS['p'];//the page number $displayLength = 5;//the number of news to display per page @$db = mysql_pconnect('localhost', '', ''); if(!$db){ echo" ERROR: </b>Could not connect to database. Please try again later"; exit; } mysql_select_db('DB') ; $query = "SELECT title, picture, content FROM news ORDER BY expiry_date DESC LIMIT ".($pageNo*$displayLength).", ".$displayLength; $result = mysql_query($query); $query1 = "select count(*) from news"; if($result){ for($a=0;$a<$displayLength;$a++){ $row = mysql_fetch_array($result); $title = $row['title']; $picture_url = $row['picture']; $content = $row['content']; //print the news if($title){ echo "<p style=\"color: rgb(147, 3, 187); font-weight: bold;\"><u>$title</u></p>"; if($picture_url) echo "<img src=\"$picture_url\" alt=\"Picture\" align=\"right\" border=\"0\" hspace=\"5\" vspace=\"5\">\n"; echo $content; }else{ break; } } $query = "SELECT count(*) FROM news"; $result1 = mysql_query($query); $row = mysql_fetch_array($result1); $dbSize = $row[0]; $availableNoOfPagesInDB = $dbSize/$displayLength; $nextPage = $pageNo+1; $previousPage = $pageNo-1; echo "<p align=\"right\">"; ?> [/code] Thanks,I appreciate
-
[code] <?php $pageNo = $HTTP_GET_VARS['p'];//the page number $displayLength = 5;//the number of news to display per page @$db = mysql_pconnect('localhost', '', ''); if(!$db){ echo" ERROR: </b>Could not connect to database. Please try again later"; exit; } mysql_select_db('DB') ; $query = "SELECT title, picture, content FROM news ORDER BY expiry_date DESC LIMIT ".($pageNo*$displayLength).", ".$displayLength; $result = mysql_query($query); $query1 = "select count(*) from news"; if($result){ for($a=0;$a<$displayLength;$a++){ $row = mysql_fetch_array($result); $title = $row['title']; $picture_url = $row['picture']; $content = $row['content']; //print the news if($title){ echo "<p style=\"color: rgb(147, 3, 187); font-weight: bold;\"><u>$title</u></p>"; if($picture_url) echo "<img src=\"$picture_url\" alt=\"Picture\" align=\"right\" border=\"0\" hspace=\"5\" vspace=\"5\">\n"; echo $content; }else{ break; } } $query = "SELECT count(*) FROM news"; $result1 = mysql_query($query); $row = mysql_fetch_array($result1); $dbSize = $row[0]; $availableNoOfPagesInDB = $dbSize/$displayLength; $nextPage = $pageNo+1; $previousPage = $pageNo-1; echo "<p align=\"right\">"; ?> [/code] Thanks,I have stripped it of the formating
-
Hi, I am trying to implement a page,whereby if images is available it will be displayed but if not it wont display it.My codes are working but with a little bug,if image is not supply it will leave show the image placeholder (the kind that is shown if the image is not available).here are my codes [code] <div class="mainContent"> <p><h2 align="center" style="color: #330099;"><u>News and Events</u></h2></p> <?php $pageNo = $HTTP_GET_VARS['p'];//the page number $displayLength = 5;//the number of news to display per page @$db = mysql_pconnect('localhost', '', ''); if(!$db){ echo "<p style=\"color: #CC0000;\" align=\"center\"><b>ERROR: </b>Could not connect to database. Please try again later</p><p align=\"center\"> Please refresh this page and if the problem persists, contact <a href=\"mailto:webmaster@smeresources.org\">webmaster</a>. Thank you<br /></p>"; exit; } mysql_select_db('DB') ; $query = "SELECT title, picture, content FROM news ORDER BY expiry_date DESC LIMIT ".($pageNo*$displayLength).", ".$displayLength; $result = mysql_query($query); $query1 = "select count(*) from news"; if($result){ for($a=0;$a<$displayLength;$a++){ $row = mysql_fetch_array($result); $title = $row['title']; $picture_url = $row['picture']; $content = $row['content']; //print the news if($title){ echo "<p style=\"color: rgb(147, 3, 187); font-weight: bold;\"><u>$title</u></p>"; if($picture_url) echo "<img src=\"$picture_url\" alt=\"Picture\" align=\"right\" border=\"0\" hspace=\"5\" vspace=\"5\">\n"; echo $content; }else{ break; } } $query = "SELECT count(*) FROM news"; $result1 = mysql_query($query); $row = mysql_fetch_array($result1); $dbSize = $row[0]; $availableNoOfPagesInDB = $dbSize/$displayLength; $nextPage = $pageNo+1; $previousPage = $pageNo-1; echo "<p align=\"right\">"; if($previousPage >= 0){ echo "<a href=\"news.php?p=".($previousPage)."\"><strong><previous</strong></a>"; } if($nextPage <= $availableNoOfPagesInDB){ echo " <a href=\"news.php?p=".($nextPage)."\"><strong>next></strong></a>"; } echo "</p>"; } ?> [/code] and it is giving this error message [code] Parse error: syntax error, unexpected T_ELSE in /home/sm/public_html/news.php on line 41 [/code] Thanks
-
Thanks it is now working
-
Thanks, let me try that out
-
Hi, Thanks for the effort,but it is giving me this error [code] Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/sme/public_html/InvestmentManager.php on line 33 [/code] Thanks My Regards
-
Hi, I am trying to get a field updated from a web interface,but it have been reporting some error.below are my codes The textarea where the new data should be entered [code] <p align="center"><strong><font color="#9303BB" size="5"><u>Investment Tip Manager</u></font></strong></p> <p> </p> <form id="form1" name="form1" method="post" action="InvestmentManager.php"> <p>Enter quote:</p> <p> <label> <textarea name="investment_tip" cols="40" rows="8" id="investment_tip"></textarea> </label> </p> <label><br /> <input name="AddBtn" type="submit" id="AddBtn" value="Submit" /> </label></form> [/code] The code that does the update [code] <?php $investment_tip = $HTTP_POST_VARS['investment_tip']; $investment_tip = trim($investment_tip); $investment_tip = addslashes($investment_tip); //check the fields for errors, if any if(!$investment_tip || empty($investment_tip)){ echo "<p style=\"color: #CC0000;\" align=\"center\"><b>Error: </b>You need to enter Investment Tips to be uploaded </p><p align=\"center\"> Click the BACK button in the browser to go back or click <a href=\"investment_tip_manager.php\">here</a> to start all over</p>"; exit; @$db = mysql_pconnect('localhost', '', ''); if(!$db){ echo "<p style=\"color: #CC0000;\" align=\"center\">Could not connect to the database. Please try again later</p><p align=\"center\"> Please refresh this page and if the problem persists, contact <a href=\"mailto:webmaster@sources.org\">webmaster</a>. Thank you<br /></p>"; exit; } mysql_select_db('DB')or die ('Unable to select database!'); $query = "UPDATE investment SET investment_tip=\"".$investment_tip."\""; $result = mysql_query($query) or die ('Error in query: $query. ' . mysql_error()); if(!$result) { echo "<p style=\"color: #CC0000;\" align=\"center\"><b>Error: </b>Could not update the investment tip database. </p><p align=\"center\"> Click the BACK button in the browser to go back or click <a href=\""investment_tip_manager.php\">here</a> to start all over.</p>"; exit; } else { echo "<p style=\"color: #CC0000;\" align=\"center\"><b>Done: </b>Investment Tip database have been updated. </p>"; exit; } ?> </div> [/code] I will appreciate your assistance. My Regards
-
A two way communication between mysql databases on residing internet & intranet
xux replied to xux's topic in MySQL Help
Hi, Talking about the replication,can it communicate between intranet and internet?Thanks -
A two way communication between mysql databases on residing internet & intranet
xux replied to xux's topic in MySQL Help
Yea, But there should be a finer control what is transfered.Can it be implemented with mysql? Thanks a lot -
A two way communication between mysql databases on residing internet & intranet
xux replied to xux's topic in MySQL Help
Thanks, Let me shed more light.I am from a developing country where the internet is not always available.Am working with an organisation that is skeptical of moving there data online cos it is not always dependable.But we are working on the idea of the databases online(internet) and the one residing on the intranet communication(i.e once one is uploaded the other get uploaded automatically).I was asked to look into the possibilities and whether mysql can implement it.Please I hope I can get answers and how to implement it.Thanks a lot -
Hi, I want to know whether mysql can be configured in such a way that two different databases one residing on the internet and the other on the intranet can communicate with each other(once one is updated the other get all the recent data).Am sure there must be an access point but is it possible.Thanks XUX